Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Help moving away from named templates

From: Abel Braaksma <abel.online@--------->
To:
Date: 5/2/2007 3:39:00 PM
Steve wrote:




1) To display their profile I *could* do:



<xsl:apply-templates match="Records/Record/node()[name()='firstName']"/>

I second David's remarks, but perhaps you are searching a way to 
uniquely identify the node from your sample, which is currently not 
unique enough from a larger perspective? Depending on what info is 
present in your real data, you could take any amount of data that you 
can use to uniquely identify the user or the 'record'. Most notably: use 
the ID that you probably have from your database, and do the 
apply-templates such:



<xsl:apply-templates select="Record[@id ='123']" />
.....
<xsl:template match="Record">
   ... your action here ...
</xsl:template>





-- Abel



PS: you mention a call-template that you want to replace with 
apply-templates (which is often a good thing). Can we see (part of) your 
original code that you want to update? Surely you have something that 
currently does select certain 'records' correctly?


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