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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Parameter entities?

I'm trying to convert a DTD that was originially designed for SGML, but we
now want to use it with XML. I have the following definition:

<!ENTITY % config          "configuration?" >

<!ENTITY % front.matter    "(cover, revision.record, toc, lof, lot,
acronym.list, safety.summary, references)" >

<!ENTITY % body.contents   "((chapter+ | appendix*) , %config;)+" >

Xerces complains about the use of the %config; entity reference in the
definition of  %body.contents. The error is:

[Fatal Error] cats.dtd:102:63: The parameter entity reference "%config;"
cannot occur within markup in the internal subset of the DTD.

but I can't validatiate this with the 1.1 spec and I don't think this area
changed from the earlier version. So we have:

[72]    PEDecl    ::=    '<!ENTITY' S '%' S Name S PEDef S? '>'
[74]    PEDef    ::=    EntityValue | ExternalID
[9]    EntityValue    ::=    '"' ([^%&"] | PEReference | Reference)* '"'
   |  "'" ([^%&'] | PEReference | Reference)* "'"
[69]    PEReference    ::=    '%' Name ';'

That sequence of rules seems to me to allow this:

"((chapter+ | appendix*) , %config;)+"

So maybe it doesn't allow the other content to be there witht the PE
reference. So I changed the model to this:

<!ENTITY % config          "(configuration)?" >
<!ENTITY % body.contents   "%config;" >

I still get the same error with this design. What am I missing?

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS