slide 32
Copyright © 2005 W3C (MIT, ERCIM, Keio)
Localization Note
Data categories
<prolog>
<its:rules its:version="1.0">
<its:translateRule selector=" //msg/notes " translate="no"/>
<its:locNoteRule locNoteType=" description " selector=" //msg/data "
locNotePointer=" ../notes "/>
</its:rules>
</prolog>
<body>
<msg id="FileNotFound">
<notes> Indicates that the resource file {0} could not be loaded. </notes>
<data> Cannot find the file {0}. </data>
</msg>
<msg id="DivByZero">
<notes> A division by 0 was going to be computed. </notes>
<data> Invalid parameter. </data>
</msg>
</body>
Global use:
Go to previous slide Go to next slide Go to the first slide Go to the slide index Go to the PDF version
Slide 32 of 50
In this example we use the locNoteRule element to select all data elements that have a parent element msg, and point to the location of the note information for that data element. In this case we use a relative XPath expression to say that the note is contained in the notes element that has the same msg parent. You can see the notes and text for translation in the lower part of the example.
Note, also, that we use another global rule to state that all notes elements are to be left untranslated.
"