Checking for CDATA section with XML Schema

This should cover W3C XML Schema, Relax NG and DTD related problems.
Juergen

Checking for CDATA section with XML Schema

Wed Dec 29, 2004 10:05 pm

Hi,

I'm working with the following XML data:
---
<book>
<title><![CDATA[A Book Title]]></title>
</book>
---

Is it possible to check for the existence of the <![CDATA[...]]> section with XML Schema and only accept it if the CDATA tag is present?

Thanks for any help.

Regards,
Juergen
george
Site Admin
Posts: 2100

Thu Dec 30, 2004 4:57 pm

Hi Juergen,

No, you cannot do this. XML Schema does not distinguish between

<book>
<title><![CDATA[A Book Title]]></title>
</book>

and

<book>
<title><A Book Title</title>
</book>

Best Regards,
George

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest