[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Parameter entities?
- From: dvint@dvint.com
- To: xml-dev@lists.xml.org
- Date: Fri, 22 Aug 2008 11:54:24 -0400 (EDT)
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?
..dan
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]