Creating a new Xmap from an XML Schema(XSD) file
If
you have been provided with an XML Schema file or have created one yourself you
can load that schema into the fPxmap wizard using the XSD menu.
The
wizard will parse the XSD using the Apache Xerces XML parser
and custom XSD parsing code. Some of the less frequently used XSD
constructs are not supported in this release of
the wizard. The log file, which can be viewed through the Help
menu, provides a detailed log of the parsing events. Annotation and
documentation elements in the XSD are not part of the parsed output but they can
be viewed using the View raw XSD choice from the XSD
menu.
The main filePro file can be set using the "main file
map" choice from the filePro menu.. As the
name implies this choice also displays the map for that file. The filePro
menu can also be used to view the maps of lookup files and to view processing
tables from the main filePro file. Only files saved as ASCII can be viewed
from inside the wizard.
What remains once the XSD has been parsed
and the main filePro file has been set is the mapping. Any listed tag that has
a tag type of 'E' or 'A' can be mapped.
The
mapping involves entering the filePro field
in the "filePro field" column on the row that corresponds to the
XML tag to which you wish to map the field.
XML tags that have
a tag type
of 'T' are defined types in the XSD and must be expanded before they or their
descendants can be mapped.. The tag be expanded by checking the
checkbox in the "Expand column" . Removing the check will revert
the tag back to its original state if neither they nor any descendants have been
mapped.
Sometimes multiple passes through the lookup table are
required for a single record from the main file. This sort of mapping is
accomplished through the use of loops
which can be inserted into the table via the provided buttons. The
loop labels correspond to processing table labels. One label is used to specify
the entry point, or start, of the loop. The other label is used to control
repeated passes through the loop. If at the end of the loop the loop
control label evaluates to false then the loop is exited. The loop will also exit if
any of the mapped tags inside the loop have hit their maxOccurs value.
In
this release filePro only enforces the minOccurs and maxOccurs restrictions. All
other restrictions are listed for the benefit
of the developer who will be responsible for enforcing them.
The
completed map can by saved using the "Save" or "save
As" choices from the File menu.
See also:
tags
tag types
filePro fields
processing loops
restrictions
unsupported XML Schema constructs