"rwt:attributeTU_<attrName>" (RC-WinTrans Instruction Attribute)

 

<xsl:attribute name="rwt:attributeTU_attrName" namespace="RC-WinTrans"></xsl:attribute>

 

The RC-WinTrans instruction attribute "rwt:attributeTU_<attrName>" specifies that an XML attribute is translatable.

 

Attribute value: the resource name (identifier) [used for the translation unit in RC-WinTrans].  The attribute value (resource name) can be empty to use a default resource name that is created by RC-WinTrans and that uses the XML element name plus the name of the XML attribute (e.g., "Material:DENS").

 

The Instruction attribute "rwt:attributeTU_<attrName>" consists of the prefix text and the name of the XML attribute to be translated.

 

PREFIX:  "rwt:attributeTU_"

 

XML ATTRIBUTE NAME:  "XMLattrName"  (name of the attribute to be translated)

 

"rwt:attributeTU_" + "XMLattrName" = "rwt:attributeTU_XMLattrName"

 

EXAMPLE:  "rwt:attributeTU_Description"

"rwt:attributeTU_name"

 

Related topics...

 

 

XML File to be Processed

 

<?xml version="1.0"?>

<materials>

  <material  attr1="Alloy Steel" attr2="steel" matid="3">   </material>

  <material attr1 "Cast Stainless Steel" attr2="steel"  matid="6">   </material>

 </materials>

 

 

Sample Code – XML Parser (XSL File)

Element with Translatable Attribute

The <material> element attribute "attr1" is designated as translatable.

 

 <!-- The element 'material'. Make a group and translate the attribute 'name' -->

  <xsl:template match="material">

   <xsl:element name="material">

           <xsl:attribute name="rwt:attributeTU_attr1"
                    namespace = "RC-WinTrans"></xsl:attribute>

      <xsl:apply-templates

                select="*|@*|text()|comment()|processing-instruction()"/>

   </xsl:element>

  </xsl:template>

 

^ Top ^