Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Adding empty CDATA bad?

Reply
Thread Tools

Adding empty CDATA bad?

 
 
Stephan Wehner
Guest
Posts: n/a
 
      08-27-2004
If an XSD schema file says

<xs:simpleType name="EXAMPLETYPE">
<xs:restriction base="xs:string">
<xs:minLength value="4"></xs:minLength>
<xs:maxLength value="4"></xs:maxLength>
</xs:restriction>
</xs:simpleType>
:
:
<xs:element maxOccurs="1" minOccurs="1" name="EXAMPLE"
type="EXAMPLETYPE"/>
:
:

is this excerpt from an XML file valid with respect to the XSD:

:
:
<EXAMPLE><![CDATA[]]><![CDATA[1234]]></EXAMPLE>
:
:
assuming this:

:
:
<EXAMPLE><![CDATA[1234]]></EXAMPLE>
:
:

is valid? Meaning can inserting an "empty" CDATA section (
<![CDATA[]]> ) change the validity?

Thanks

Stephan
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      08-27-2004
In article <(E-Mail Removed) >,
Stephan Wehner <(E-Mail Removed)> wrote:
>Meaning can inserting an "empty" CDATA section ( <![CDATA[]]> )
>change the validity?


No. The schema validator doesn't even see the CDATA section; it's
been replaced (by nothing!) before schema validation is done.

-- Richard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I un-CDATA my CDATA section and elaborate a transformation for the contained data? troppfigo@excite.it XML 3 03-06-2006 03:01 AM
Altova Mapforce - xml 2 xml map: empty elements output although input element is not empty Lukas XML 3 11-10-2005 02:25 PM
Extracting CDATA Text without CDATA Tags??? John Davison Java 1 07-06-2004 11:00 PM
Check if a directory is empty and empty it Marcia Hon C Programming 8 02-14-2004 03:53 AM
empty/non-empty element John XML 1 07-16-2003 10:23 AM



Advertisments