ModSAX: Proposed Core Features

Sean Mc Grath digitome at iol.ie
Sat Mar 13 10:26:24 GMT 1999


[Sean Mc Grath]
>
>> My point is that you cannot switch from:
>>         <!DOCTYPE foo SYSTEM "doc.dtd">
>> to:
>>         <!DOCTYPE foo [
>>         <!ENTITY % dtd SYSTEM "doc.dtd">
>>         %dtd;
>>         ]>
>> 
>> and expect things to be exactly the same. if you have
>> conditional sections in doc.dtd, the latter is illegal.
>
[John Cowan]
>I understand what you mean.  I believe you are not correct.
>Conditional sections are allowed in external PEs referenced
>from the internal subset, just not in the internal subset itself.
>

I only have one validating XML parser on this machine IBMs
XML4J:-

doc.dtd
	<!ELEMENT foo (#PCDATA)>
	<![IGNORE[
	<!ATTLIST foo bar CDATA #REQUIRED>
	]]>

a.xml
	<?xml version="1.0"?>
	<!DOCTYPE foo [
	<!ENTITY % dtd SYSTEM "doc.dtd">
	%dtd;
	]>
	<foo></foo>

b.xml
	<?xml version="1.0"?>
	<!DOCTYPE foo SYSTEM "doc.dtd">
	<foo></foo>

b.xml validates. a.xml fails reporting:-
	Error: Conditional section only allowed in external subset. (2,3)


<Sean uri="http://www.digitome.com/sean.htm"/>



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list