XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Invalid Markup in External DTD conditionals

Hello all,

If I look at the XML conformance tests, I can find the test with the ID ibm-valid-P65-ibm65v02.xml has the below external DTD

<?xml version="1.0" encoding='UTF-8'?>
<!--dtd for production 65-->
<![IGNORE[
this is some stringwithout brackets
<![
<!ELEMENT animal EMPTY>
]]>
this is another string without brackets
]]>
<!--Positive test. Pattern2-->

This is in line with the spec, which has the below definition

[61]       conditionalSect       ::= includeSect | ignoreSect
[62]       includeSect           ::=       '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'     [VC: Proper Conditional Section/PE Nesting]
[63]       ignoreSect            ::=       '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'    [VC: Proper Conditional Section/PE Nesting]
[64]       ignoreSectContents    ::=       Ignore ('<![' ignoreSectContents ']]>' Ignore)*
[65]       Ignore                ::=       Char* - (Char* ('<![' | ']]>') Char*)

"Validity constraint: Proper Conditional Section/PE Nesting

If any of the "<![", "[", or "]]>" of a conditional section is contained in the replacement text for a parameter-entity reference, all of them MUST be contained in the same replacement text."

My question is: Why is the ignore section not expected to be valid declarations like an <![INCLUDE[]]> section? I mean, if you have to check the IgnoreSection of a DTD anyway to ensure that the <![ and ]]> are all correct, it seems a bit of a waste to have to implement dedicated parsing rules for something you are going to be discarding regardless. Is this a holdover from SGML? Or was there some other motiviation?

Just curiosity really; would be interested to learn more about XMLs history.

Thanks in advance,

Regards,

Daniel



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS