[
Lists Home |
Date Index |
Thread Index
]
----- Original Message -----
From: "Toni Uusitalo" <toni.uusitalo@pan.nu>
To: "Karl Waclawek" <karl@waclawek.net>
Cc: <xml-dev@lists.xml.org>
Sent: Thursday, April 22, 2004 3:07 PM
> >Given these declarations:
> > <!ENTITY % ATTLIST "ATTLIST ">
> > <!ENTITY % CLOSE ">">
> > <!ENTITY % ELEMNAME "doc">
> > <!ENTITY % ATTNAME "att">
> >
> >This would be well-formed, but not valid, I believe:
> > <!%ATTLIST; %ELEMNAME;%ATTNAME; CDATA #FIXED "value"%CLOSE;
> >since now the references are not in the position of a DeclSep.
>
> I think this couldn't be well-formed because of 4.4.8 Included as PE:
> "...replacement text is enlarged by the attachment of one leading and one
> following space (#x20) character..."
> There would be space between <! and ATTLIST so this wouldn't work.
It seems so. Then let's just change it like that:
<!ENTITY % CLOSE ">">
<!ENTITY % ELEMNAME "doc">
<!ENTITY % ATTNAME "att">
<!ATTLIST%ELEMNAME;%ATTNAME; CDATA #FIXED "value"%CLOSE;
That should be well-formed, I think.
> but as you refered to testcase /xmltest/not-wf/not-sa/010.xml
> 010.ent:
> <!ENTITY % e "<!ELEMENT ">
> %e; doc (#PCDATA)>
>
> this looks like very clear indication that PE reference alone isn't
> allowed in the start of DTD declaration element -
> it isn't well-formed as the test shows.
Yes, because it is in a position of a DeclSep .
> But wait a minute, what constitutes a well-formed declaration then?
> starting <!ELEMENT and closing > must come from the same (nesting level of)
> replacement text?
Not necessarily. See the changed example above.
> <!ENTITY % DOC "doc">
> <!ENTITY % e "<!ELEMENT %DOC; (#PCDATA)>">
> %e;
> is valid.
> and "everything" between starting and closing tags can be PE references (in
> external
> DTD subset) i.e.
> <!ELEMENT %DOC; %CONTENT_MODEL;>
> Is this correct?
Well, almost, IMO - see above.
Karl
|