Bob, et al,
I am using SAXON 6.5.5 and a fairly standard catalog file - most of it came  
out of your book. What I am trying to do is to set up the tools and static 
files  so that each documentation project can be run out of its own directory 
and 
 reference the catalog and corporate ENTITY files that will exist in a  
separate directory.
 
The dir structure will look similar to this
 
<docroot>
     |-  doctools
     |-  documentation
         |- corp  (static ENTITY files (*.mod))
          |- project1
          |- project2
 
 
This structure needs to work on Windows and Linux, so all of the tools are  
in doctools (saxon,fop,etc). However, the entity files are not being located  
correctly under Linux, using relative dirs. I have even tried static directory  
names (as below) but to no avail.
 
The error that I get is that SAXON is looking for the entity file in the  
"project" directory where the process is run from, but it is located in the  
"corp" dir.
 
I'm sure there is a better way of locating corporate static files, so I am  
open to suggestions. But I would still like to solve this catalog/entity  issue.
 
 
Regards,
 
Dean Nelson
 
------- catalog file ----------
<!DOCTYPE catalog    PUBLIC "-//OASIS/DTD Entity  Resolution XML Catalog 
V1.0//EN"
"_http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd_ 
(http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd) "  [

<!ENTITY  XSL_VER           "docbook-xsl-1.73.2">
<!ENTITY  DB_VER            "docbook-xml-4.5">
<!ENTITY  MATHML_VER       "MathML2">
<!ENTITY BASE_DIR          "../../">
<!ENTITY CORP_MOD_DIR     "_file:///root/doc/documentation/corp/_ 
(file:///root/doc/documentation/corp/) ">
 
]> 
<!--  ENTITIES
BASE_DIR =  this is the base of the whole doc tree including  doctools
Linux : "_file:///root/doc/_ (file:///root/doc/) "
Win32 : "../../"
<!ENTITY  BASE_DIR         "_file:///root/doc/_ (file:///root/doc/) ">
<!ENTITY  BASE_DIR          "../../">

-->

<catalog prefer="public"  xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
 
    <group  xml:base="&BASE_DIR;"> <!--  configured above -->
<!--  <group  prefer="public" xml:base="_file:///root/doc/_ 
(file:///root/doc/) ">  --> <!-- UNIX/LINUX -->
<!--  <group  prefer="public" xml:base="../../">  -->            <!--  
Windows -->

<system   systemId="met-xinclude.mod"    uri="&CORP_MOD_DIR;/met-
xinclude.mod"/>
<system    systemId="met-defs.mod"        uri="&CORP_MOD_DIR;/met-defs.mod"/>
<uri  name="met-xinclude.mod"            
uri="&CORP_MOD_DIR;/met-xinclude.mod"/>     

<public publicId="-//OASIS//DTD  DocBook XML V4.4//EN"  
uri="doctools/&DB_VER;/docbookx.dtd"/>
<public publicId="-//W3C//DTD MathML  2.0//EN"          
uri="doctools/MathML2/mathml2.dtd"/>

<rewriteSystem 
systemIdStartString="_http://www.oasis-open.org/docbook/xml/4.4/_ 
(http://www.oasis-open.org/docbook/xml/4.4/) "  
rewritePrefix="doctools/&DB_VER;/"/>
<rewriteSystem systemIdStartString="_http://www.docbook.org/xml/4.4/_ 
(http://www.docbook.org/xml/4.4/) "             
rewritePrefix="doctools/&DB_VER;/"/>
<rewriteSystem systemIdStartString="_http://www.docbook.org/xml/4.5/_ 
(http://www.docbook.org/xml/4.5/) "             
rewritePrefix="doctools/&DB_VER;/"/>
<rewriteSystem systemIdStartString="_http://www.w3.org/TR/MathML2/dtd/_ 
(http://www.w3.org/TR/MathML2/dtd/) "           
rewritePrefix="doctools/&MATHML_VER;/"/>

<!-- Resolve stylesheet URL to  local file -->
<rewriteURI  
uriStartString="_http://docbook.sourceforge.net/release/xsl/current/_ 
(http://docbook.sourceforge.net/release/xsl/current/) "     
rewritePrefix="doctools/&XSL_VER;/"/>

</group>

<!-- Resolve DTD PUBLIC identifiers  -->
<nextCatalog  catalog="doctools/&DB_VER;/catalog.xml"/>
 
</catalog>
----------------------------------

 
 
In a message dated 2/27/2008 10:58:26 A.M. Pacific Standard Time,  
[EMAIL PROTECTED] writes:

Hi,
A catalog entry can resolve an entity reference.  Can you describe  your 
catalog entries?
 
Have you tried using the catalog debugging feature of the parser?   What 
parser are you using?
 
Does the file still exist in the current directory?  If you are  using 
xsltproc, then if it finds it in the current directory, it will use that  and 
not 
bother with executing a catalog lookup.  I complained about this  "feature" to 
the developers of xsltproc, asking for at least an option to  force catalog 
retrieval, but I don't think it happened.
 
Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) 
 
 

----- Original Message ----- 
From:  [EMAIL PROTECTED] (mailto:[EMAIL PROTECTED])  
To: [EMAIL PROTECTED] 
(mailto:docbook-apps@lists.oasis-open.org)   
Sent: Monday, February 25, 2008 6:08  PM
Subject: [docbook-apps] Shared entity  include file issues


All,
 
I have an ENTITY in the DOCTYPE for my documents that references an  entity 
file that I include. However, I want to move that to central  directory so that 
it can be available for other docs as well. 
 
I would like to resolve it's location with a catalog file, but I am  having 
no luck adding it to my catalog file. The file is still looked for in  the 
current directory.
 
For example here is my source:
 
 
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book  PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
"_http://www.docbook.org/xml/4.4/docbookx.dtd_ 
(http://www.docbook.org/xml/4.4/docbookx.dtd) "[
<!ENTITY  % xinclude SYSTEM "met-xinclude.mod">
<!ENTITY % met-defs  SYSTEM "met-defs.mod">
%xinclude;
%met-defs;  
]>
 
<book>
<title>&DOC_TITLE;</title>
...
 
I would like to map the two mod files to a specific directory with a  catalog 
 file. I have looked at  Bob's section on "Using  an XML catalog to relocate 
dbgenent.mod" in
_http://sagehill.net/docbookxsl/ModularEntities.html_ 
(http://sagehill.net/docbookxsl/ModularEntities.html) 
 
But that kind of hides the info a bit plus it only works with one extra  
include file, not two. It seems like a catalog should resolve an "ENTITY"  
filename.
 
Can anyone help me out with this?
 
Thanks,
Dean Nelson
 



 
____________________________________
 Delicious ideas to please the pickiest eaters. _Watch the video on AOL  
Living._ 
(http://living.aol.com/video/how-to-please-your-picky-eater/rachel-campos-duffy/2050827?NCID=aolcmp00300000002598)
 






**************Ideas to please picky eaters. Watch video on AOL Living.      
(http://living.aol.com/video/how-to-please-your-picky-eater/rachel-campos-duffy/
2050827?NCID=aolcmp00300000002598)

Reply via email to