XSLT and XPath in XMLIN > Default match criteria for fields and patterns

Default match criteria for fields and patterns
When you let the XMLIN tool pick fields and patterns from a sample, the XMLIN tool suggests which XSLT Patterns to use in the match criteria definitions. To change the default settings you must select Tools > Event Options and edit the settings.
See www.w3.org/TR/xslt for more information about XSLT patterns.
Ancestor axis level
On the Message tab you can set the Ancestor axis level which specifies the number of ancestor nodes included in the path for a match criterion. See the examples below.
Path indexes
On the Message tab you can specify whether or not to include path indexes in the path for a match criterion. Path indexes are used to distinguish one branch in the XML tree from another. See the examples below.
Including attributes in the match criteria for field paths
By default, the match criterion suggested for field paths includes element names, but not attributes. On the Custom Field Paths tab, you can configure the XMLIN tool to include a specified attribute in the path. Note that if multiple instances of an element contains this attribute, only first instance, but not its siblings, will have the attribute included in the match path. Elements that do not contain the specified attribute will not be affected. To enable the use of attributes in the path you must:
1
Select Match element name or attribute.
2
See the examples below.
Examples
The XML sample below is used in all examples. The match criteria in all examples refer to the highlighted node.
<?xml version="1.0"?>
<!DOCTYPE music SYSTEM "DTDS/musichits.dtd">
  <music>
    <CD>
        <Composer type="western">Brahms</Composer>
   </CD>
   <CD>
        <Composer type="eastern">Quing Mao</Composer>
   </CD>
  </music>
Example 25
XSLT patterns settings:Click to enlarge
Suggested match criterion:
music/CD/Composer
 
Example 26
XSLT patterns settings:Click to enlarge
Suggested match criterion:
music[1]/CD[2]/Composer[1]
 
Example 27
XSLT patterns settings:Click to enlarge
Suggested match criterion:
CD/Composer
 
Example 28
XSLT patterns settings:Click to enlarge
Custom field paths settings:Click to enlarge
Suggested match criterion:
music/CD/Composer[@type=’eastern’]
 
 
OpenText StreamServe 5.6 Updated: 2013-03-01