Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSLT2: manipulate node-set variable [Thread Next] Re: XSLT2: manipulate node-set variableTo: NULL Date: 4/26/2009 1:59:00 PM Sebastian Fey wrote:
> the elements in the output contain data from all over the original xml.
> so id like to add attributes to the out-elements in different templates.
>
> i think this should be possible with xslt2 variables or the node-set
> extension for xslt1.
>
> like i hava a
> <xsl:variable name="to_be_postproc">
> <element att1="data_from_this_template" />
> ...
> </xsl:var>
>
> and later i do:
> $to_be_postproc/@att2 = "{from_this_template}"
You would need
$to_be_postproc/element/@att1
to access the attribute named 'att1' of the element named 'element' in
the variable 'to_be_postproc'.
I am not sure what
= "{from_this_template}"
is supposed to be or mean.
Whether you need several processing steps I am not sure. You might want
to show your XML input and the output you want to produce, then we might
be better able to tell whether you can achieve that with on processing
step or whether you need several steps.
XSLT 2.0 has nice stuff like http://www.w3.org/TR/xslt20/#element-next-match
xsl:next-match
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
