[
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 "&#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 " ">
]>
<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.
|