Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing"
m |
|||
Line 305: | Line 305: | ||
</source> | </source> | ||
− | [[Category:SMILA]] | + | [[Category:SMILA]] [[Category:SMILA/Pipelet]] |
Revision as of 06:22, 15 October 2008
Contents
- 1 org.eclipse.smila.processing.pipelets.xmlprocessing.XslTransformationPipelet
- 2 org.eclipse.smila.processing.pipelets.xmlprocessing.StxTransformationPipelet
- 3 org.eclipse.smila.processing.pipelets.xmlprocessing.XPathExtractorPipelet
- 4 org.eclipse.smila.processing.pipelets.xmlprocessing.XPathFilterPipelet
- 5 org.eclipse.smila.processing.pipelets.xmlprocessing.RemoveElementFromXMLPipelet
- 6 org.eclipse.smila.processing.pipelets.xmlprocessing.TidyPipelet
org.eclipse.smila.processing.pipelets.xmlprocessing.XslTransformationPipelet
Description
Pipelet that performs an XSL transformation on an attribute or attachment value and stores the transformed document in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
xslFile | String | the name (with relative or absolute path) of the XSL file to use for transformation |
Example
PipeletConfiguration for XslTransformationPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="xslFile" type="java.lang.String"> <Value>./configuration/data/author.xsl</Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>
org.eclipse.smila.processing.pipelets.xmlprocessing.StxTransformationPipelet
Description
Pipelet that performs an STX transformation on an attribute or attachment value and stores the transformed document in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
stxFile | String | the name (with relative or absolute path) of the STX file to use for transformation |
Example
PipeletConfiguration for StxTransformationPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="stxFile" type="java.lang.String"> <Value>./configuration/data/example1.stx</Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTACHMENT</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTACHMENT</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>
org.eclipse.smila.processing.pipelets.xmlprocessing.XPathExtractorPipelet
Description
Pipelet that extracts elements selected by XPath, converts them in appropriate data types (Boolean, Double, String) and stores the transformed value in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
xpath | String | the XPATH to evaluate |
seperator | String | the seperator (optional) |
namespace | String | the XML namespace (optional) |
Example
PipeletConfiguration for XPathExtractorPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="xpath" type="java.lang.String"> <Value>author/email</Value> </Property> <Property name="seperator" type="java.lang.String"> <Value></Value> </Property> <Property name="namespace" type="java.lang.String"> <Value></Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>
org.eclipse.smila.processing.pipelets.xmlprocessing.XPathFilterPipelet
Description
Pipelet that filters elements by XPath (either include or exclude mode) and stores the filtered elements as a new document in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
xpath | String | the XPATHs to evaluate (multivalue) |
filterMode | String : INCLUDE, EXCLUDE | the filter mode, if to include or exclude the elements specified by xpath |
seperator | String | the seperator (optional) |
namespace | String | the XML namespace (optional) |
Example
PipeletConfiguration for XPathFilterPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="xpath" type="java.lang.String"> <Value>author/name</Value> </Property> <Property name="xpath" type="java.lang.String"> <Value>author/email</Value> </Property> <Property name="filterMode" type="java.lang.String"> <Value>EXCLUDE</Value> </Property> <Property name="seperator" type="java.lang.String"> <Value></Value> </Property> <Property name="namespace" type="java.lang.String"> <Value></Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>
org.eclipse.smila.processing.pipelets.xmlprocessing.RemoveElementFromXMLPipelet
Description
Pipelet that removes a selected element from an XML document and stores the remaining document in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
elementId | String | the id of the XML element to remove |
Example
PipeletConfiguration for RemoveElementFromXMLPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="elementId" type="java.lang.String"> <Value>1</Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTACHMENT</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTACHMENT</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>
org.eclipse.smila.processing.pipelets.xmlprocessing.TidyPipelet
Description
Pipelet that performs a Tidy transformation on an attribute or attachment value and stores the result in an attribute or attachment.
Configuration
Property | Type | Description |
---|---|---|
inputType | String : ATTACHMENT, ATTRIBUTE | selects if the XML input is found in an attachment or attribute of the record |
outputType | String : ATTACHMENT, ATTRIBUTE | selects if the transformed output should be stored in an attachment or attribute of the record |
inputName | String | name of input attachment or path to input attribute (process literals of attribute) |
outputName | String | name of output attachment or path to output attribute (store result as literals of attribute) |
tidyFile | String | the name (with relative or absolute path) of the tidy configuration file to use |
Example
PipeletConfiguration for TidyPipelet
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor"> <Property name="tidyFile" type="java.lang.String"> <Value>./configuration/data/tidy_config.txt</Value> </Property> <Property name="inputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="outputType" type="java.lang.String"> <Value>ATTRIBUTE</Value> </Property> <Property name="inputName" type="java.lang.String"> <Value>xmlIn</Value> </Property> <Property name="outputName" type="java.lang.String"> <Value>xmlOut</Value> </Property> </PipeletConfiguration>