Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Apply templates problem!

From: "Hans" <hans@------.--->
To: NULL
Date: 4/4/2006 4:16:00 PM

Hi Ariana!

Yes my first example with the parameter is working.
<xsl:apply-templates select="../TABLE[@id='Table_24C' and 
DBNR=$CURRENT_DBNR]/> <!-- WORKS -->

but what I wondered is if I have to create the parameter and use that in the 
criteria or if I can access the DBNR value directly? The code below is NOT 
legal but maybe you get an idéa what I try to acchive? I just want to set 
the DBNR criteria to the value of the current DBNR value but I can only 
achive this by first putting the current DBNR value in a parameter which I 
then use in the apply-templates criteria.
<xsl:apply-templates select="../TABLE[@id='Table_24C' and DBNR=<xsl:value-of 
select="DBNR"/>]/>

Instead of the <xsl:value-of select="DBNR" I tried with just setting 
DBNR=DBNR or DBNR=./DBNR but it does not give the correct result.

I guess I could send in the parameter like below but then I have to do the 
actual check in the Table template so see if DBNR=$CURRENT_DBNR. I'm not 
sure but I thought it would be more efficient (in a performance perspective) 
to set the criteria in the apply-templates directly but I'm not 100% sure 
about that.
>      <xsl:apply-templates select="Table">
>          <xsl:with-param name="CURRENT_DBNR" select="DBNR"/>
>      </xsl:apply-templates>

Regards
/Hans 




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