Regarding the "Mixed" production of both XML 1.0 and 1.1 specifications

Hi XML editors,

In both the XML 1.0 and 1.1 specs, the "Mixed" production is defined in the
same way:
 1.0: http://www.w3.org/TR/2008/REC-xml-20081126/#sec-mixed-content
 1.1: http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-mixed-content

Mixed ::= '(' S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
'#PCDATA' (S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>? '|'
S<http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
Name <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Name>)*
S<http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
')*' | '(' S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
'#PCDATA' S<http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
')'

And the following mixed element declaration examples are given:

1) <!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
2) <!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
3) <!ELEMENT b (#PCDATA)>

It is clear to me how examples 1) and 3) are parsed, but I do not
understand the 2nd case.

"%font;", "%phrase;" etc... look like the PEReference production, and not
like Name one.

Name, more precisely NameStartChar, does not accept '%' as a first
character.

So, should I read the "Mixed" production as follows, or is the provided
example wrong?

Mixed ::= '(' S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
'#PCDATA' (S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>? '|'
S<http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
(Name <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Name> |
PEReference))* S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>? ')*' |
'(' S <http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>? '#PCDATA'
S<http://www.w3.org/TR/2008/REC-xml-20081126/#NT-S>?
')'

Many thanks!

--
Dinesh Bolkensteyn
www.SonarSource.com <http://www.sonarsource.com/>
twitter.com/DBolkensteyn <http://www.SonarSource.com>

Received on Tuesday, 5 February 2013 16:44:12 UTC