- From: James Clark <jjc@jclark.com>
- Date: Tue, 27 May 1997 10:21:23 +0700
- To: w3c-sgml-wg@w3.org
- Cc: richard@cogsci.ed.ac.uk
>The production for ignoreSect [57] is wrong; it requires conditional >sections within it to be themselves ignoreSect, ie have the keyword >IGNORE. > >We need something like: > >ignoreSect ::= '<![' %'IGNORE' '[' ignoredDecls ']]>' > >ignoredDecls ::= ... | > '<![' ('IGNORE'|'INCLUDE'|PEReference) '[' ignoredDecls ']]>' > >We should also allow the keys of ignored nested conditional sections >to be references to undeclared parameter entities, say by replacing >PEReference in the above with '%' Name ';' It doesn't need to look past the <![. >I'm not convinced about the rest of production 57 either: the last >top-level disjunct appears to match, say, > > <!entity foo "bar">]]> The final * is in the wrong place: it needs to be moved past the two following close parentheses. The idea behind production 57 is to ensure that: 1. An ignored section ends where an SGML parser thinks it would. An SGML parser just looks at <![ and ]]> inside an ignored marked section. 2. Changing IGNORE to INCLUDE wouldn't change where the conditional section ends. Without 2, it's impossible to have a really trivial XML parser that just skips over the prolog without interpreting it. I think this should do it: ignoreSect ::= '<![' %'IGNORE' '[' ignoreSectContents ']]> ignoreSectContents ::= ( ((SkipLit | Comment | PI) - (Char* ']]>' Char*)) | ( '<![' ignoreSectContents ']]>') | (Char - ([<'"] | ']') | ('<! (Char - ('-' | '['))) )* James
Received on Monday, 26 May 1997 23:37:53 UTC