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 Radu,

Thank you for the tips.  Using "systemSuffix and systemIDSuffix allows me to
validate the document.  That's a great help.  However, when I go to process
the document in Oxygen, I get this error:

[xslt] : Fatal Error! Failure reading
file:/C:/Activity/Cogent/Docs/DocsOx/Source/TestBook1/test3-book.xml Cause:
java.io.FileNotFoundException:
C:\Activity\Cogent\Docs\DocsOx\Source\TestBook1\commonentityID (The system
cannot find the file specified)

I followed your suggestion to move the TestCatalg.xml file into the same
directory as the commonentities.ent file.  Now the source files look like
this:

TestCatalog.xml:

<!DOCTYPE catalog 
      PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" 
      "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd";>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    <systemSuffix systemIdSuffix="commonentityID"
        uri="commonentities.ent"/>
</catalog>

test3-book.xml:

<!DOCTYPE book [
<!ENTITY % commonentities SYSTEM "commonentityID" >
%commonentities;
]>
<book xmlns="http://docbook.org/ns/docbook"; version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude";
	xmlns:xlink="http://www.w3.org/1999/xlink"; xml:id="test3-book">
	<info>
		<title>Test Book 3</title>
	</info>
	<chapter xml:id="test3-introduction">
		<info>
		<title>Introduction - A Simple Book</title>
		</info>
		<para>Test entity: &copy;</para>
	</chapter>
</book>

Those both validate in Oxygen, but it gives that "cannot find the file"
error when processing the document.  I have tried modifying the Preferences
for the XML Catalog in different ways, but nothing seems to affect the
problem.  The current settings can be seen in the attached image:
CatalogSnip.png.

I'm sure I'm doing something wrong, but can't figure out what.  Can you see
what the problem might be?

Best regards,

Bob

 
Bob McIlvride	Communications Manager
Cogent Real-Time Systems Inc., a Skkynet company
T  1 905 702 7851 ext 103
cogent.ca
 
-----Original Message-----
From: Radu Coravu <radu_coravu@sync.ro> 
Sent: Tuesday, March 12, 2019 1:44 AM
To: docbook-apps@lists.oasis-open.org
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/commonentiti
> es.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/commonentiti
> es.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/commonentiti
> es.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.dt
> d
>
>
>
> 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/commonentiti
> es.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/>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

Attachment: CatalogSnip.png
Description: PNG image



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