Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: using html in variables

From: Stanimir Stamenkov <s7an10@--------.--->
To: NULL
Date: 8/6/2008 9:51:00 AM

Tue, 5 Aug 2008 11:03:41 -0700 (PDT), /David Schwartz/:
> Tue, 05 Aug 2008 18:29:16 +0200, /Martin Honnen/:
>
>> If your variable contains a result tree fragment then you need to use 
>> xsl:copy-of instead of xsl:value-of e.g.
>>    <xsl:copy-of select="$bar"/>
> 
> That was it! Can you explain what the issue was a bit more fully?

<http://www.w3.org/TR/xslt#value-of>:

> The xsl:value-of element is instantiated to create a text node in 
> the result tree. The required select attribute is an expression; 
> this expression is evaluated and the resulting object is converted 
> to a string as if by a call to the string function. [...]
> 
> The xsl:copy-of element can be used to copy a node-set over to the 
> result tree without converting it to a string. See [11.3 Using 
> Values of Variables and Parameters with xsl:copy-of].

You could read about the 'string' function 
<http://www.w3.org/TR/xpath#function-string> and what is the 
string-value of root (and element) nodes 
<http://www.w3.org/TR/xpath#dt-string-value> (a bit down below). 
Such node is the one in your variable result-tree-fragment value 
<http://www.w3.org/TR/xslt#dt-result-tree-fragment>.

-- 
Stanimir


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