OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Question about the erratum E15

[ Lists Home | Date Index | Thread Index ]

I have a question about E15 in XML 1.0 Second Edition Specification
Errata.

I don't know whether correctly I understood the second sentence of
the numbered paragraph 2 in the Element valid VC ; "Note that a
CDATA section ..."

I tried validating the following samples. Please check the results.

Thanks.



sample 1:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
   ]>
   <sec>
     <![CDATA[ ]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since the white space doesn't match S.


sample 2:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
     <!ENTITY ent " ">
   ]>
   <sec>
     <![CDATA[&ent;]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is valid, since its replacement text matches S.


sample 3:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
     <!ENTITY ent "&#38;#x20;">
   ]>
   <sec>
     <![CDATA[&ent;]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since its replacement text doesn't match S.


sample 4:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
     <!ENTITY ent "&#x20;">
   ]>
   <sec>
     <![CDATA[&ent;]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is valid, since its replacement text matches S.


sample 5:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
   ]>
   <sec>
     <![CDATA[]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since the empty string doesn't match S.


sample 6:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
   ]>
   <sec>
     <![CDATA[test]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since the string doesn't match S.


sample 7:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
   ]>
   <sec>
     <![CDATA[<!-- test -->]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since the string doesn't match S.


sample 8:
   <!DOCTYPE sec [
     <!ELEMENT sec (title, para)>
     <!ELEMENT title (#PCDATA)>
     <!ELEMENT para (#PCDATA)>
   ]>
   <sec>
     <![CDATA[<?test1 test2?>]]>
     <title>CData Section</title>
     <para>This is a sample.</para>
   </sec>

     -> It is invalid, since the string doesn't match S.

---
Takahide Muramoto <murah@flab.fujitsu.co.jp>
Fujitsu Ltd. 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS