Page History
...
In order to optimise the activity, it processes the source XML document without reference to any associated schema or DTD. The split documents created by this activity should be well-formed (*) XML (providing the source XML document is well-formed). However, it cannot be guaranteed that the split documents are valid (*) with reference to the source document schema or DTD. In addition, depending on the structure of the source +document and upon the split element specified, the split documents may not always contain all the available data in the source document.
| Info | ||
|---|---|---|
| ||
(*) This description assumes you understand the distinction between the terms "well-formed" and "valid" in relation to XML documents. If in doubt, please refer to appropriate XML references. |
In addition, please understand that XML is capable of representing an infinite variety of document structures. This activity may not be capable of splitting every source document in the way that you intended or expected. In order to keep the activity simple to use while enabling it to be useful for the largest range of likely scenarios, the activity makes certain assumptions about how to split documents and what antecedent data to retain or duplicate in the split documents. You should thoroughly test it with representative samples of the XML documents with which you intend to use it before designing a solution that relies on this activity.
...
The output split document paths and names are generated according to the values specified or assumed for the XMLSPLITPATH and XMLSPLITROOT parameters. If documents of the generated name(s) exist in the target location, they will be replaced by this activity.
INPUT Parameters:
XMLFILE: Required
This parameter specifies the path and name of the XML document file to be split.
XMLSPLITELEMENT: Optional
This parameter specifies the name of the XML element at which the source XML document is to be split. If not specified, a default of *FIRST is assumed. *FIRST means the name of the first XML element INSIDE the root element (ie: NOT the root element) is used as the split element name.
...
- the instance(s) of the split element and all elements that they contain.
XMLSPLITELEMENTSMAX: Optional
This parameter specifies the maximum number of split element instances per split document. If not specified, a default of 1 is assumed. The activity will place "sibling" instances of the split element into the same split document, up to the number specified by this parameter. When the parent element is closed, the split document is closed whether or not the maximum is reached. Further instances of the split element will trigger another split document for which the count restarts at one.
XMLSPLITPATH: Optional
This parameter specifies the path in which the split XML document files are to be created. If not specified, a default of *SAME is assumed. *SAME means the split XML document files will be created in the same location as the input XML document file.
XMLSPLITROOT: Optional
This parameter specifies the root file name and the file extension for the split XML document files. If not specified, a default of *SAME is assumed. *SAME means the activity will use the file name and extension of the input XML document file as the root file name and the file extension for the split XML document files. The activity will append a sequential number to the root file name to make each split XML document file name. For example, if you specify 'ORDER.xml'as the value for this parameter and the input file is split into three XML document files, then they would have the names 'ORDER1.xml', 'ORDER2.xml' and 'ORDER3.xml'.
XMLSPLITNOTRACE: Optional
This activity uses LANSA Integrator's XMLReaderService and XMLWriterService. These services may generate particularly large LANSA Integrator trace files, especially as this activity is typically used to process exceptionally large XML files. More so than many activities, the performance of this activity will be dramatically improved if LANSA Integrator tracing is not ON while it is executing. The default value for this parameter, if not specified, turns the LANSA Integrator tracing OFF.
If you want to use LANSA Integrator tracing, then specify 'NO' for this parameter. You are advised to do this only during design and testing and only with relatively small sample input XML files. Note that this does NOT necessarily enable tracing - it simply makes it subject once more to LANSA Composer's System Settings.
OUTPUT Parameters:
XMLSPLITCOUNT:
Upon successful completion this parameter will contain the count of split documents created.
XMLSPLITLIST:
Upon successful completion this parameter will contain a list of the full file paths of the split documents created.