This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: CDATA block to node set.
- From: Morten Primdahl <morten at it-c dot dk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 10 May 2002 00:51:07 +0200
- Subject: Re: [xsl] CDATA block to node set.
- References: <001301c1f7a8$82439c80$6501a8c0@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Michael Kay wrote:
>>I know that my question may seem that of a delusional madman.
>>But I'm well aware of what CDATA is, I had just hoped to access it
>>the same way one can access data from a URL:
>
>
>
> Well, you can. The CDATA contains a string. If this string is well-formed
> XML, you can turn it into a tree by parsing it. Saxon 7.1 allows you to do
> this using saxon:parse(). But it still begs the question: the purpose of
> CDATA is to say "the stuff in here isn't markup", so if it is markup, why
> are you putting it in CDATA?
Because I would like to parse my language for validity. Part of the
language definition allows arbitrary well-formed XML as data input -
so I guess my validity parse can only be "partial". If I use a DTD,
I need to escape the arbitrary XML (hence the CDATA). I'm looking into
the "lax" option of XML Schemas in an attempt to avoid this.
Thanks for the pointer on saxon:parse() :)
Morten
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list