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


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:

disable-output-escaping="yes">&lt;td width="100%"
   			No events are currently scheduled.

could more easily and more portably be coded as

		    <td width="100%" valign="top">
   			No events are currently scheduled.

> 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.


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:

Current Thread