[Prev][Next][Index][Thread]

Conditional sections



XML currently defines conditional sections like this:

[57]	conditionalSect	:=	'<![' CSKey '[' csdata ']]>'
[58]	CSKey	:=	PEReference | 'INCLUDE' | 'IGNORE'
[59]	csdata	:=	internalsubset

This is not compatible with SGML because in SGML ignored marked sections are
only scanned for nested <![ and ]]>.

So for example, in XML (as I understand [59]), the marked section in

<![ignore[
<!--* ]]> *-->
]]>

will be terminated by the second ]]> whereas in SGML it will be terminated
by the first.

Unfortunately the SGML way makes it harder for DTD-less parsers to find the
end of the DTD subset.  Since I can do

<!%foo;[
<!--* ]]> *-->
]]>

I can't tell in SGML where the subset ends without at least processing
parameter entity declarations.

James