xsl-list
[Top] [All Lists]

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

2008-03-25 09:48:28


I've used xsl:sequence instead of xsl:value-of for this type of mixed
content. Are there any issues with this approach that will haunt me
later?


your message doesn't say what the approach is (other than using sequence
instead of value-of) the subject line gives some clues, but appears
confused.

"Selecting unparsed text from inside a tag"

XSLT has no access to the tags in a source file, assuming you mean
element here the content is always parsed.

The only way of getting text that hasn't been parsed by an XML parser
into XSLT is with the unparsed-text() function, but that never generates
mixed content, it just returns a string, using xsl:value-of or
xsl:sequence on the result of unparsed-text()  makes no difference in
most contexts. If you use xsl:value-of, it generates a text node
directly, if you use xsl:sequence it generates a string, but if that
string is being copied to the result tree, it is implictly wrapped in a
text node.

David (confused:-)

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

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