Global rules are specified in <its:rules> elements. You can
have several <its:rules> elements per document, but they are
evaluated as one set, in the order they appear in the document. Their location
in the document (at the top, at the bottom) has no bearing to their effect as
all global rules are expressed from the root of the document.
Use the xmlns attribute to specify any namespace to use in
the XPath expressions specified in the ITS rules.
Global rules are used to specify mapping of internationalization features of the host format to ITS, or to apply ITS features to selections of the host format.
Local ITS markup is used to override any global rule for a give element inside
the document. You can also use the <its:span> element to
delimit portions of text if the host format does not have an equivalent
element.
For more details on any ITS rules always refer to the latest ITS Specification document, or to the latest Editor's copy of the document and to the ITS Public Mailing List to see what may be under discussion.
Global: SUPPORTED <its:translateRule translate="yes|no" selector="AbsoluteXPathExpression" /> Local: SUPPORTED its:translate="yes|no"
Global: SUPPORTED
<its:locNoteRule selector="AbsoluteXPathExpression" locNoteType="description|alert" (optional)> <its:locNote>Text of the note</its:locNote> </its:locNoteRule> Local: SUPPORTED its:locNote="Text of the note" its:locNoteType="description|alert" (optional)
Global: SUPPORTED
<its:locNoteRule selector="AbsoluteXPathExpression" locNoteType="description|alert" (optional)> locNotePointer="RelativeXPathExpression" />
Global: SUPPORTED <its:locNoteRule selector="AbsoluteXPathExpression" locNoteType="description|alert" (optional)>
locNoteRef="SomeURI" /> Local: SUPPORTED
its:locNoteRef="SomeURI" its:locNoteType="description|alert" (optional)
Global: SUPPORTED <its:locNoteRule selector="AbsoluteXPathExpression" locNoteType="description|alert" (optional)> locNoteRefPointer="RelativeXPathExpression" />
Global: SUPPORTED <its:termRule selector="AbsoluteXPathExpression" termInfoRef="SomeURI" (optional) /> Local: SUPPORTED its:term="yes" its:termInfoRef="SomeURI" (optional)
Global: SUPPORTED <its:termRule selector="AbsoluteXPathExpression" termInfoRefPointer="RelativeXPathExpression" />
Global: SUPPORTED <its:termRule selector="AbsoluteXPathExpression" termInfoPointer="RelativeXPathExpression" />
Global: SUPPORTED <its:withinTextRule selector="AbsoluteXPathExpression" withinText="yes|no|nested" />
This application supports a few extensions to demonstrate how you can add features to ITS.
The extension namespace is "okapi-framework:its-extensions". You must declare it
along with the ITS namespace to use the extensions. there are two extensions:
This attribute, placed in a <its:translateRule> element, allows you to specify
where the translated text should go. This is useful for XML formats that are designed
to work with source and target text. The value is an XPath expression relative to
the location pointed by the selector attribute.
<its:translateRule translate="yes|no" selector="AbsoluteXPathExpression"
itsext:targetPointer="RelativeXPathExpression"/>
This attribute, placed in a <its:translateRule> element, allows
you to associate specify that a given element or attribute is the identifier for
the selected item. This is useful for example when extracting data to XLIFF to map
the resname attribute of XLIFF to the identifier of the extracted item. The value
is an XPath expression relative to the location pointed by the selector
attribute.
<its:translateRule translate="yes|no"
selector="AbsoluteXPathExpression"
itsext:idPointer="RelativeXPathExpression"/>