xsl-list
[Top] [All Lists]

Re: [xsl] Selecting unparsed text from inside a tag

2008-03-25 02:10:51
Jefferson Thomas wrote:
<snip />

        <xsl:value-of select="."/>

<snip />

So the difference is that the <br/> and <img> would also come up. As
for now I couldnt find any way for that.
Does somebody know how to do it ?

The instruction xsl:value-of does what it says: it takes the value of the node you select (and in terms of XSLT, and using the short explanation, a value is the text-value of a node). What you want is the instruction xsl:copy-of, which creates an exact copy of the node.

Btw, XSLT is not aware of tags, it is aware of nodes. A node of type element consists of three parts: an opening tag, the content, the closing tag. For XSLT, this is an atomic unit: a node. Compare it to a DOM node, which doesn't have information on tags either.

Cheers,
-- Abel Braaksma



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--