[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Invalid Markup in External DTD conditionals

  • From: Daniel Murphy <daniel@devasta.ie>
  • To: xml-dev@lists.xml.org
  • Date: Tue, 25 Jul 2023 01:14:08 +0100

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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.