Invalid grammar productions

There are some invalid grammar productions described in the latest xml11 
specification.

"Using" sections denote proposed corrected productions.

 Broken.
  [1] document            ::=        (prolog element Misc*) - (Char* 
RestrictedChar Char*)
 Using:
  [1] document            ::=        prolog element Misc*
Rationale:
The production
   (Char* RestrictedChar Char*) matches the entire input, therefore the 
first part of the production is never matched.

Broken.
 [14] CharData        ::=        [^<&]* - ([^<&]* ']]>' [^<&]*)
Using:
 [14] CharData        ::=        ([^<&] - ']]>')*
Rationale:
The exclusion portion [^<&]* matches zero or more occurences of [^<&], 
which include the characters ]]>>. This means that it will match beyond 
the intented ending sequence.

Broken.
 [16] PI                ::=        '<?' PITarget (S (Char* - (Char* '?>' 
Char*)))? '?>'
Using:
 [16] PI                ::=        '<?' PITarget (S (Char - '?>')*)? '?>'
Rationale:
 See [2]

Broken.
 [20] CData            ::=        (Char* - (Char* ']]>' Char*))
Using:
 [20] CData            ::=        (Char - ']]>')*
Rationale:
 See [2]

Broken.
 [78] extParsedEnt    ::=        TextDecl? content - Char* 
RestrictedChar Char*
Using:
 [78] extParsedEnt    ::=        TextDecl? content
Rationale:
 See [1]
Notes:
 Errata entry E02 added parentheses around the relevant portions of the 
'document' production due to the operator precedence ambiguity, but that 
correction has been omitted here.

That's all for now... more in depth analysis underway.

Received on Wednesday, 9 June 2004 08:08:19 UTC