Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] does not work with

From: Katharina Kreis <katharinakreis@------>
To:
Date: 3/1/2005 8:22:00 AM
Hi!



I'm trying to use <xsl:with-param> together with <xsl:apply-templates>.



XML-File:
*<?xml version="1.0"?>
<Building>
   <Floor>
       <Room>
           <number>1</number>
           <wall_IDs>
               <wall_ID>123</wall_ID>
               <wall_ID>234</wall_ID>
               <wall_ID>345</wall_ID>
               <wall_ID>456</wall_ID>
           </wall_IDs>
       </Room>
       <Room>
           <number>2</number>
           <wall_IDs>
               <wall_ID>123</wall_ID>
               <wall_ID>678</wall_ID>
               <wall_ID>789</wall_ID>
               <wall_ID>901</wall_ID>
           </wall_IDs>
       </Room>
   </Floor>
   <Wall_List>
       <Wall ID="123">
           <width>2</width>
       </Wall>
       <Wall ID="234">
           <width>3</width>
       </Wall>
       <Wall ID="345">
           <width>2</width>
       </Wall>
       <Wall ID="456">
           <width>1</width>
       </Wall>
   </Wall_List>
</Building>

*XSL-File:

*<?xml version='1.0'?>

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">



<xsl:template name="Room" match="Room">
   <!-- ... -->
   <xsl:for-each select="wall_IDs/wall_ID">
       <xsl:variable name="wall_ID" select="."/>
       <xsl:apply-templates select="/Building/Wall_List/Wall">
           <xsl:with-param name="wallID" select="$wall_ID"/>
       </xsl:apply-templates>
   </xsl:for-each>
</xsl:template>

<xsl:template name="Wall" match="Wall">
   <xsl:param name="wallID"/>
   <!-- ... -->
</xsl:template>

</xsl:stylesheet>



*In the "Room" Template I create a variable with the current wall-ID and 
I can view it by calling <xsl:value-of>. Then I use <xsl:with-param> to 
put the variable in the "Wall" template. And this doesn't work. In the 
"Wall" Template it has no value.

Why? I think <xsl:with-param> must work with <xsl:apply-templates>?!



Thanks for helping
Katharina


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent