"rwt:elementTU" (RC-WinTrans Instruction Attribute)

 

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

 

The RC-WinTrans instruction attribute "rwt:elementTU" specifies that an XML element's text is translatable.  RC-WinTrans will create a translation unit for this element.

 

Attribute value: the resource name (identifier) [used for the translation unit in RC-WinTrans].  The element's resource name is mandatory.  It is visible in the "Name/ID" column in the Project window's Text Table view.  The name should be unique within a group of elements so that the element can be positively identified during the update database process to ensure complete accuracy.

 

Related topics...

 

 

File 1: XML File to be Processed

 

<?xml version="1.0" encoding="windows-1252"?>

<Keywords>

   <Keyword>

      <Category>VP_BEGIN_KEY</Category>

      <ReferenceId>86</ReferenceId>

      <Name>SpotB</Name>

      <Description>Adjusted spot kVA on phase @B</Description>

      <Unit>(kVA)</Unit>

    </Keyword>

</Keywords>

 

 

Sample Code 1: Element with Fixed Resource Name

XSL template (XML parser): XSL template to add the "rwt:elementTU" instruction attribute to all <Description> elements.  A fixed resource name "DESCR" is used.

 

<!-- Set all "Description'' elements as translatable -->

 <xsl:template match="Description">

  <xsl:element name="Description">      

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

                                DESCR</xsl:attribute>

     <xsl:apply-templates

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

  </xsl:element>

 </xsl:template>

 

 

Sample Code 2: Element with Referenced Resource Name

XSL template (XML parser), same as Sample Code 1.  The resource name for <Description> elements is specified as fixed text ("DESCR") and the value of the <Name> element (see File 1, above).

 

"DESCR ( <xsl:value-of select="../Name"/>)"      (Result: e.g., "DESCR (SpotB)")

 

<!-- Set all "Description'' elements as translatable -->

 <xsl:template match="Description">

  <xsl:element name="Description">      

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

                            DESCR (<xsl:value-of select="../Name"/>)</xsl:attribute>

     <xsl:apply-templates

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

  </xsl:element>

 </xsl:template>

 

^ Top ^