You use XSLT Patterns as match criteria to map nodes in the XML input document to fields in the XMLIN configuration. A match criterion describes the path to the node and, if required, additional conditions. XPath expressions define which value to add to the field.
The match criterion is specified as “CD/Composer”. There will be a match for all <
Composer> nodes in the input.
The match criterion is specified as “CD/Composer[2]”. There will be a match for the second
<Composer> node below each
<CD> node.
The match criterion is specified as CD/Composer[@type=’eastern’]. There will be a match for all <
Composer> nodes with attribute
type="eastern".
The nodes <CD> and
<Composer> correspond to the fields
CD and
Composer respectively. The match criteria are specified as
/music/CD and
/music/CD/Composer.
The value for the field CD is specified as “
.” (dot). The following value is extracted from the XML input:
The value for the field CD is specified as
normalize-space(.). The following value is extracted from the XML input:
The text nodes between <CD> and
</CD> are extracted. Line-breaks, tabs, etc. are ignored.
The value for the field CD is specified as
text(). The following value is extracted from the XML input:
The value for the field CD is specified as
normalize-space(text()). The following value is extracted from the XML input:
The text nodes between <CD> and
<Composer> are extracted. Line-breaks, tabs, etc. are ignored.
The value for the field Composer is specified as
../../text(). The following value is extracted from the XML input:
The value for the field Composer is specified as
normalize-space(../../.). The following value is extracted from the XML input: