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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] How to use a catalog for an entity declaration file?


Hi Bob,

Here are 3 possibilities:

1) An entity reference like this:

<!ENTITY % commonentities SYSTEM "commonentityID" >

would be resolved by a catalog entry like this:

<systemSuffix systemIdSuffix="commonentityID" uri="file:///C:/Activity/Cogent/Docs/DocsOx/Source/Common/commonentities.ent"/>

2) An entity reference like this:

<!ENTITY % commonentities SYSTEM "../Common/commonentities.ent" >

would be resolved by a catalog reference like this:

<systemSuffix systemIdSuffix="Common/commonentities.ent" uri="file:///C:/Activity/Cogent/Docs/DocsOx/Source/Common/commonentities.ent"/>

3) An entity reference like this:

<!ENTITY % commonentities SYSTEM "http://someHost/Common/commonentityID"; >

would be resolved by a catalog entry like this:

 <system systemId="http://someHost/Common/commonentityID"; uri="file:///C:/Activity/Cogent/Docs/DocsOx/Source/Common/commonentities.ent"/>

Also in practice no absolute file references should be in the catalog.xml. So the catalog.xml would be placed as close as possible to the DTDs, for example in the "DocsOx/Source/Common" folder, meaning that the @uri attribute value would be something like this:

<system systemId="....." uri="commonentities.ent"/>


Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 3/11/2019 10:33 PM, Bob McIlvride wrote:
Dear friends,



I am trying to implement this guidance from Chapter 23. Modular DocBook
files of Bob Stayton's DocBook XSL: The Complete Guide - 4th Edition:



"If all of your modules and document files have the same entity
declaration and reference, then they will all share the same set of
entities. You can use an XML catalog to map the filename to a specific
pathname on a system so it can be in a central location."

http://www.sagehill.net/docbookxsl/ModularEntities.html#entities.in.dtd



My problem is that I don't know the correct syntax for the system entity
declaration.  For example, this doesn't work:



<!DOCTYPE book [

<!ENTITY % commonentities SYSTEM "commonentityID" >

%commonentities;

]>

...



My catalog looks like this:



<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

    <system systemId="commonentityID"
uri="file:///C:/Activity/Cogent/Docs/DocsOx/Source/Common/commonentities.ent"/>

</catalog>



The catalog validates in Oxygen.



Without attempting to use the catalog, this is what we normally use:



<!DOCTYPE book [

<!ENTITY % commonentities SYSTEM "../Common/commonentities.ent" >

%commonentities;

]>

...



This also validates and produces correct output.  How can we get this
working using a catalog?  Any suggestions would be most helpful.



Best regards,



Bob





COGENT <http://cogent.ca/>

	

*Bob McIlvride **   Communications Manager*

Cogent Real-Time Systems Inc., a Skkynet company

T   1 905 702 7851 ext 103

cogent.ca <http://cogent.ca/>







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