
First, thank you very much for your helpful reply over the last few days. It has really helped me. I'm trying to figure out how to insert character entities in docbook 5. Reading the docbook 5 documentation , I learned that you still need to indicate a doctype to validate: http://www.docbook.org/docs/howto/#faq-authoring-general-entities After I added the example entity set, <!DOCTYPE article [ <!ENTITY % isopub SYSTEM "http://www.w3.org/2003/entities/iso8879/isopub.ent"> %isopub; ]> things worked a-ok in oxygen. Here's my question. My oxygen editor validated successfully only if I have a doctype declaration at the top of every xml document referenced by the xincludes in addition to the main document. That doesn't make sense. That means I need to have 10 (or 100 or 200) instances of boilerplate code at the top of the doc. If I put the doctype element only once in the main index file (the file with the references to the xincludes), shouldn't the validator be aware of the entity file after it was declared at the top of the main index file? Or is this something quirky about the validation engine which is requiring each file to have a doctype element? Finally, I'm not sure I understand the syntax of the doctype element. (need to do some research). This reference goes to a public document, not to something local which I can maintain. If I added this to the catalog under the framework/docbook5 directory, <system systemId="http://www.w3.org/2003/entities/iso8879/isopub.ent" uri="isopub.ent"/> would this be sufficient? This would mainly be a concern if I wanted to add to my list of entities over time (or reference different entity sets). How would this be done? Thanks for your help.. -- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 htpt://www.robertnagle.info

Hello, Robert Nagle wrote:
Here's my question. My oxygen editor validated successfully only if I have a doctype declaration at the top of every xml document referenced by the xincludes in addition to the main document.
That doesn't make sense. That means I need to have 10 (or 100 or 200) instances of boilerplate code at the top of the doc.
If I put the doctype element only once in the main index file (the file with the references to the xincludes), shouldn't the validator be aware of the entity file after it was declared at the top of the main index file? Or is this something quirky about the validation engine which is requiring each file to have a doctype element?
A declaration of a DTD entity must be included in every XML file containing an entity reference because the entity references are expanded on the validator pipeline before resolving the XInclude include elements which means the entity declaration must be available in the same XML file where the entity is used. That is the entity declaration at the top of the main file is not available when the included files are parsed. I see that both Xerces and LibXML work in the same way with regard to XInclude and DTD entities.
Finally, I'm not sure I understand the syntax of the doctype element. (need to do some research). This reference goes to a public document, not to something local which I can maintain.
If I added this to the catalog under the framework/docbook5 directory,
<system systemId="http://www.w3.org/2003/entities/iso8879/isopub.ent" uri="isopub.ent"/>
would this be sufficient?
Yes, if the local file isopub.ent is stored in the same folder as the XML catalog file. Relative paths are resolved relative to the location of the catalog file. Regards, Sorin
participants (2)
-
Robert Nagle
-
Sorin Ristache