Help: Allowing a CDATA section

A

AdSR

Hi,

This question appeared before on this group, but I didn't find any
helpful answer. I have to allow a CDATA section inside a type (it's
derived by extension from an empty element type, if that makes any
difference). How do I do that? The XML Schema docs on www.w3.org don't
say that.

TIA,

AdSR
 
A

AdSR

Never mind, it's simple. Just do something like:

<xsd:complexType name="FillableType">
<xsd:complexContent mixed="true">
<xsd:extension base="NonFillableType">
<!-- Allow a CDATA section -->
<xsd:sequence>
<xsd:any minOccurs="0" processContents="lax"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
 
R

Richard Tobin

AdSR said:
This question appeared before on this group, but I didn't find any
helpful answer. I have to allow a CDATA section inside a type

XML Schemas operate on the Infoset, which does not distinguish between
CDATA sections and ordinary text. Any type that allows text in an
element will allow CDATA sections too.

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top