[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] how to get variable value outside scope
Subject: Re: [xsl] how to get variable value outside scope From: David Carlisle <davidc@xxxxxxxxx> Date: Sat, 26 Feb 2005 23:54:46 GMT |
Why are you using d-o-e everywhere? By doing this <xsl:text disable-output-escaping="yes"></td></xsl:text> rather than generating a td element node you are losing much of the benefit of using xslt. Here you are generating the markup tagging of an XML document string directly and XSLT is explictly designed not to give direct acces to the tags either on input or output, so although d-o-e gives some kind of half hearted support for this (on xslt systsems that support d-o-e) you're almost always better using perl or some other such text based system if you need to generate tags. On the other hand it looks like it would be easy enough to generate the nodes directly, for example: <tr> <xsl:text disable-output-escaping="yes"><td width="100%" valign="top"></xsl:text> No events are currently scheduled. <xsl:text disable-output-escaping="yes"></td></xsl:text> </tr> could more easily and more portably be coded as <tr> <td width="100%" valign="top"> No events are currently scheduled. </td> </tr> > What I am trying to do is capture the value of the > "category" variable and pass it outside the current scope so I can link > to another page with more content relevant to the specific category. I didn't follow the details of your coding but this is what xsl:with-param is for (most likely). If one template depends on a value calculated by another then you need tp pass that value as a parameter. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] how to get variable value out, Brian Phelps | Thread | RE: [xsl] how to get variable value, Michael Kay |
[xsl] how to get variable value out, Brian Phelps | Date | RE: [xsl] getting rid of xmlns, Michael Kay |
Month |