OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] DTD parameter entities

[ Lists Home | Date Index | Thread Index ]

At 18:19 22.4.2004, you wrote:

> > >True, but I think it violates this one:
> > >
> > ><quote>
> > >Well-formedness constraint: PE Between Declarations
> > >The replacement text of a parameter entity reference in a DeclSep
> > >MUST match the production extSubsetDecl.
> > ></quote>
> >
> > Hmm, I had thought that only applied to the internal subset, to ensure
> > that minimal parsers could skip PE references, but DeclSep is also used
> > in the production extSubsetDecl, so you are right.
> >
> > If I recall correctly, the relevant text was changed just before
> > publication of the second edition.  It seems to make the validity
> > constraint obsolete.
>There seems to be a very fine difference:
>Given these declarations:
>   <!ENTITY % CLOSE ">">
>   <!ENTITY % ELEMNAME "doc">
>   <!ENTITY % ATTNAME "att">
>This would be well-formed, but not valid, I believe:
>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.

but as you refered to testcase /xmltest/not-wf/not-sa/010.xml
<!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.

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?

<!ENTITY % DOC "doc">
is valid.
and "everything" between starting and closing tags can be PE references (in 
DTD subset) i.e.
Is this correct?

with respect,
Toni Uusitalo


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS