xsl-list
[Top] [All Lists]

Re: manipulating string

2005-09-16 15:04:31
I have an XML which looks like this:

If you have any control over your input it would be better to not start
from there, and not have the CDATA section.

Notice that description is CDATA and has some html
tags.

The problem is that there are no html tags: the only function of a CDATA
section is to specify explicitly that the content is just to be taken as
character data and are _not_ to be parsed as tags. So it is slightly
peverse to mark it up as a CDATA section, and then to want to process
the content as element markup.

Basically you need to parse the content. Having stopped the XML parser
that parsed the input from parsing this section, you need to pass this
section to a different XML parser. In simple cases it's possible to
write parse the content "by hand" in xslt but practically speaking you
need to use your processor's extension mechanism to call out to an XML
parser. How or if that is possible depends on the processor you are using.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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



<Prev in Thread] Current Thread [Next in Thread>