Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSLT2: manipulate node-set variable

From: Martin Honnen <mahotrash@-----.-->
To: 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/


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