For my ant task, just including the catalog in the path worked? <path id="xslt1.processor.classpath"> <pathelement path="${java}/${xslt1_jar}"/> <!-- Saxon jar --> <pathelement path="${java}/${resolver_jar}"/> <!-- resolver jar --> <pathelement path="${dbsaxonextensions}"/> <!-- saxon65.jar --> <pathelement path="${java}/${xerces_impl_jar}"/> <!-- xinclude --> <pathelement path="${data}/sgml"/> <!-- for catalogManager.properties -->
</path> On Wed, 13 Mar 2019 at 14:40, Bob McIlvride <bob.mcilvr...@cogent.ca> wrote: > > Hi Radu, > > I was testing with our modified version of Oxygen's DocBook WebHelp > transformation scenario, which uses an ANT build file. How would I go about > providing a reference to the xmlcatalog in the <xslt> task for that? > > By the way, I just now tried processing the document using an XSLT > transformation scenario, and that works fine. Thank you for that tip. All > I need now is a little guidance for the ANT transformation. > > 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_cor...@sync.ro> > Sent: Wednesday, March 13, 2019 2:18 AM > To: docbook-apps@lists.oasis-open.org > Subject: Re: [docbook-apps] How to use a catalog for an entity declaration > file? > > Hi Bob, > > How exactly do you process the XML file? Applying an XSLT using an XML + > XSLT transformation scenario should use automatically the XML catalog set up > in Oxygen. > Are you using an ANT build file? If so did you provide in the <xslt> task a > reference to the xmlcatalog? > > https://ant.apache.org/manual/Tasks/style.html > > Regards, > Radu > > Radu Coravu > <oXygen/> XML Editor > http://www.oxygenxml.com > > On 3/12/2019 6:45 PM, Bob McIlvride wrote: > > 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: ©</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_cor...@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/commonentit > >> i > >> 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/commonentit > >> i > >> 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/commonentit > >> i > >> 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.d > >> t > >> 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/commonentit > >> i > >> 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-unsubscr...@lists.oasis-open.org > > For additional commands, e-mail: > > docbook-apps-h...@lists.oasis-open.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > > For additional commands, e-mail: > > docbook-apps-h...@lists.oasis-open.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org