[all] Call for consensus (related to [ISSUE-16]) Parameters for rules

Hi all,

Here is the possible text for the parameters section of the specification (section 5.7, or maybe 5.6 and moving "Conversion to NIF and RDF" to 5.7)).


5.7 Rules Parameters

The <its:param> elements can be placed in the <its:rules> element to define the default values of the XPath variables used in the various XPath expressions used in the rules.

All implementations supporting XPath 1.0 or its successors as query language MUST support <its:param>.

Those implementations SHOULD also provide means for changing the default values of the <its:param> elements. Such means are implementation-specific.

The <its:param> element has a required name attribute. The value of the name attribute is a QName [See http://www.w3.org/TR/REC-xml-names/#NT-QName]. The content of the element is a string used as default value for the corresponding XPath variable.

Example NNN: Using <its:param> to define the default value of a variable in a selector attribute.

The <its:param> element defines the default value for the $LCID. In this case, only the <msg> element with the attribute lcid set to 0x049 is seen as translatable.
<doc its:version="2.0" xmlns:its="http://www.w3.org/2005/11/its">
 <its:rules version="2.0">
  <its:param name="LCID">0x0409</its:param> 
  <its:translateRule selector="/doc" translate="no" /> 
  <its:translateRule selector="//msg[@lcid=$LCID]" translate="yes" /> 
  <msg lcid="0x0409" num="1">Create a folder</msg> 
  <msg lcid="0x0411" num="1">フォルダーを作成する</msg> 
  <msg lcid="0x0407" num="1">Erstellen Sie einen Ordner</msg> 
  <msg lcid="0x040c" num="1">Créer un dossier</msg> 

Note: In XSLT-based applications, it may make sense to map ITS parameters directly to XSLT parameters. To avoid naming conflicts you can use a prefix with the attribute name's value to distinguish between the ITS parameters and the XSLT parameters.



Received on Friday, 20 July 2012 12:51:19 UTC