Node:Mistakes, Next:, Previous:Using Transbuild, Up:Using Transbuild



Common mistakes

Use the correct namespace in XPath expressions. One of the commonest mistakes is forgetting to specify the correct namespace for annotation elements and attributes.

  <xsl:value-of select="/@source"/>      <!-- wrong -->
  <xsl:value-of select="/@TBA:source"/>  <!-- correct -->

Root elements from annotation files are loaded as the contents of the annotation element. It is always one extra level down. For example, to process all the children annotation files:

  <xsl:for-each select="/*/TBA:children">    <!-- wrong -->
  <xsl:for-each select="/*/TBA:children/*">  <!-- correct -->