[docbook-apps] Catalogs
Good afternoon all, I am trying to write a catalog file for my DocBook processing so all the paths that I need are in one place. At the moment I have limited success. I have pretty much lifted the Catalog file from 'Example DocBook catalog file' - http://www.sagehill.net/docbookxsl/ExampleCatalog.htmland I have got the system to find my customisation stylesheet in the correct location. However when my file then tries to import the Docbook XSL file, it does it with the same path location as it did when it found my customisation, even though in my catalog I have a different path for this file. I am using xsltproc to produce my FO file, the command I am using is: XML_CATALOG_FILES=catalog.xml xsltproc -o output.fo cpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml If i re-run this command using fo-docbook.xsl instead it works perfectly and I get the FO, trouble is that it is not what I want. I have appened the Catalog file to the end of this email. Thanks, Russell ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog group xml:base=file:///home/russells/workspace/cpsltdonline/docbook/ uri name=cpsltdonline.xsl uri=custom/cpsltdonline.xsl / uri name=cpsltdonline-order.xsl uri=styles/cpsltdonline-order.xsl / /group !-- DTD and stylesheet files installed under /usr/share/xml -- group xml:base=file:///usr/share/xml/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=http://www.oasis-open.org/docbook/xml/4.5/; rewritePrefix=docbook/schema/dtd/4.5/ / !-- Resolve stylesheet URL to local file -- rewriteURI uriStartString=http://docbook.sourceforge.net/release/xsl/current/; rewritePrefix=docbook-xsl-1.73.1/ / !-- To resolve simple DTD SYSTEM identifiers. -- !-- Note: this does not work with Java resolver -- !-- classes in Saxon or Xalan -- system systemId=docbook.dtd uri=docbook/schema/dtd/4.5/docbookx.dtd / !-- To resolve short stylesheet references -- uri name=fo-docbook.xsl uri=docbook/stylesheet/nwalsh/fo/docbook.xsl / /group /catalog
Re: [docbook-apps] Catalogs
Russell I struggled with that also. Here what I found worked best for me. I used a relative path (mostly) instead of a fixed one. I also needed this to work for Windows and Linux so I structured it so that I would only adjust the base dir. Here is mine: Regards, Dean Nelson ?xml version=1.0 encoding=UTF-8? !DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; [ !ENTITY XSL_VER docbook-xsl-1.74.0 !ENTITY DB_VER docbook-xml-4.5 !ENTITY MATHML_VER MathML2 !ENTITY BASE_DIR file:///root/doc/ ] !-- ENTITIES BASE_DIR = this is the base of the whole doc tree including doctools Linux : file:///root/doc/ Win32 : ../../ -- !-- When changing the XSL version - make sure it is also changed in the xml.pro file -- catalog prefer=public xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog !-- DTD and stylesheet files installed under -- group xml:base=BASE_DIR; !-- configured above -- !--group prefer=public xml:base=file:///root/doc/ -- !-- UNIX/LINUX -- !-- group prefer=public xml:base=../../ -- !-- Windows -- 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/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=http://www.oasis-open.org/docbook/xml/4.4/; rewritePrefix=doctools/DB_VER;// rewriteSystem systemIdStartString=http://www.docbook.org/xml/4.4/; rewritePrefix=doctools/DB_VER;// rewriteSystem systemIdStartString=http://www.docbook.org/xml/4.5/; rewritePrefix=doctools/DB_VER;// rewriteSystem systemIdStartString=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/; rewritePrefix=doctools/XSL_VER;// rewriteURI uriStartString=http://docbook.sourceforge.net/release/slides/current/; rewritePrefix=doctools/SLIDES_VER;// rewriteURI uriStartString=http://docbook.sourceforge.net/release/slides/; rewritePrefix=doctools/SLIDES_VER;// !-- To resolve short stylesheet references -- uri name=html-docbook.xsl uri=doctools/XSL_VER;/html/docbook.xsl/ uri name=chunk.xsl uri=doctools/XSL_VER;/html/chunk.xsl/ uri name=fo-docbook.xsl uri=doctools/XSL_VER;/fo/docbook.xsl/ /group !-- Resolve DTD PUBLIC identifiers -- nextCatalog catalog=file:///../../doctools/DB_VER;/catalog.xml/ /catalog In a message dated 10/13/08 07:12:20 Pacific Daylight Time, [EMAIL PROTECTED] writes: Good afternoon all, I am trying to write a catalog file for my DocBook processing so all the paths that I need are in one place. At the moment I have limited success. I have pretty much lifted the Catalog file from 'Example DocBook catalog file' - http://www.sagehill.net/docbookxsl/ExampleCatalog.html and I have got the system to find my customisation stylesheet in the correct location. However when my file then tries to import the Docbook XSL file, it does it with the same path location as it did when it found my customisation, even though in my catalog I have a different path for this file. I am using xsltproc to produce my FO file, the command I am using is: XML_CATALOG_FILES=catalog.xml xsltproc -o output.fo cpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml If i re-run this command using fo-docbook.xsl instead it works perfectly and I get the FO, trouble is that it is not what I want. I have appened the Catalog file to the end of this email. Thanks, Russell ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog group xml:base=file:///home/russells/workspace/cpsltdonline/docbook/ uri name=cpsltdonline.xsl uri=custom/cpsltdonline.xsl / uri name=cpsltdonline-order.xsl uri=styles/cpsltdonline-order.xsl / /group !-- DTD and stylesheet files installed under /usr/share/xml -- group xml:base=file:///usr/share/xml/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=http://www.oasis-open.org/docbook/xml/4.5/; rewritePrefix=docbook/schema/dtd/4.5/ / !-- Resolve stylesheet URL to local file -- rewriteURI uriStartString=http://docbook.sourceforge.net/release/xsl/current/; rewritePrefix=docbook-xsl-1.73.1/ / !-- To resolve simple DTD SYSTEM identifiers. -- !-- Note: this does not work with Java resolver -- !-- classes in Saxon or Xalan -- system systemId=docbook.dtd uri=docbook/schema/dtd/4.5/docbookx.dtd / !-- To resolve short stylesheet references -- uri name=fo-docbook.xsl uri=docbook/stylesheet/nwalsh/fo/docbook.xsl / /group /catalog
Re: [docbook-apps] Catalogs
Dean, Thanks very much for this pointer, I think I will have do something as you have done and come up with a hybrid solution. I think this is going to be very quick question, but when I put entities in my file and then process it with xsltproc it is not expanding them out, so none of my files are being found. I am using Linux. Any ideas? Thanks again, Russell 2008/10/13 DeanNelson [EMAIL PROTECTED] Russell I struggled with that also. Here what I found worked best for me. I used a relative path (mostly) instead of a fixed one. I also needed this to work for Windows and Linux so I structured it so that I would only adjust the base dir. Here is mine: Regards, Dean Nelson ? xml version=*1.0* encoding=*UTF-8*? ! DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; [ !ENTITY XSL_VER *docbook-xsl-1.74.0* !ENTITY DB_VER *docbook-xml-4.5* !ENTITY MATHML_VER *MathML2* !ENTITY BASE_DIR *file:///root/doc/* ] !-- ENTITIES BASE_DIR = this is the base of the whole doc tree including doctools Linux : file:///root/doc/ Win32 : ../../ -- !-- When changing the XSL version - make sure it is also changed in the xml.pro file -- catalog prefer=*public* xmlns=* urn:oasis:names:tc:entity:xmlns:xml:catalog* !-- DTD and stylesheet files installed under -- group xml:base=*BASE_DIR;* !-- configured above -- !--group prefer=public xml:base=file:///root/doc/ -- !-- UNIX/LINUX -- !-- group prefer=public xml:base=../../ -- !-- Windows -- 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*/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=* http://www.oasis-open.org/docbook/xml/4.4/* rewritePrefix=* doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*http://www.docbook.org/xml/4.4/* rewritePrefix=*doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*http://www.docbook.org/xml/4.5/* rewritePrefix=*doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*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/* rewritePrefix=* doctools/XSL_VER;/*/ rewriteURI uriStartString=* http://docbook.sourceforge.net/release/slides/current/* rewritePrefix=* doctools/SLIDES_VER;/*/ rewriteURI uriStartString=* http://docbook.sourceforge.net/release/slides/* rewritePrefix=* doctools/SLIDES_VER;/*/ !-- To resolve short stylesheet references -- uri name=*html-docbook.xsl* uri=*doctools/XSL_VER;/html/docbook.xsl* / uri name=*chunk.xsl* uri=*doctools/XSL_VER;/html/chunk.xsl*/ uri name=*fo-docbook.xsl* uri=*doctools/XSL_VER;/fo/docbook.xsl*/ /group !-- Resolve DTD PUBLIC identifiers -- nextCatalog catalog=*file:///../../doctools/DB_VER;/catalog.xml*/ / catalog In a message dated 10/13/08 07:12:20 Pacific Daylight Time, [EMAIL PROTECTED] writes: Good afternoon all, I am trying to write a catalog file for my DocBook processing so all the paths that I need are in one place. At the moment I have limited success. I have pretty much lifted the Catalog file from 'Example DocBook catalog file' - http://www.sagehill.net/docbookxsl/ExampleCatalog.htmland I have got the system to find my customisation stylesheet in the correct location. However when my file then tries to import the Docbook XSL file, it does it with the same path location as it did when it found my customisation, even though in my catalog I have a different path for this file. I am using xsltproc to produce my FO file, the command I am using is: XML_CATALOG_FILES=catalog.xml xsltproc -o output.fo cpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml If i re-run this command using fo-docbook.xsl instead it works perfectly and I get the FO, trouble is that it is not what I want. I have appened the Catalog file to the end of this email. Thanks, Russell ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog group xml:base=file:///home/russells/workspace/cpsltdonline/docbook/ uri name=cpsltdonline.xsl uri=custom/cpsltdonline.xsl / uri name=cpsltdonline-order.xsl uri=styles/cpsltdonline-order.xsl / /group !-- DTD and stylesheet files installed under /usr/share/xml -- group xml:base=file:///usr/share/xml/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=http://www.oasis-open.org/docbook/xml/4.5/; rewritePrefix=docbook/schema/dtd/4.5/ / !-- Resolve stylesheet URL to local file --
Re: [docbook-apps] Catalogs
Dean, PLease ignore my last email, I am being thick. Thanks for your help.. Russell 2008/10/13 Russell Seymour [EMAIL PROTECTED] Dean, Thanks very much for this pointer, I think I will have do something as you have done and come up with a hybrid solution. I think this is going to be very quick question, but when I put entities in my file and then process it with xsltproc it is not expanding them out, so none of my files are being found. I am using Linux. Any ideas? Thanks again, Russell 2008/10/13 DeanNelson [EMAIL PROTECTED] Russell I struggled with that also. Here what I found worked best for me. I used a relative path (mostly) instead of a fixed one. I also needed this to work for Windows and Linux so I structured it so that I would only adjust the base dir. Here is mine: Regards, Dean Nelson ? xml version=*1.0* encoding=*UTF-8*? ! DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; [ !ENTITY XSL_VER *docbook-xsl-1.74.0* !ENTITY DB_VER *docbook-xml-4.5* !ENTITY MATHML_VER *MathML2* !ENTITY BASE_DIR *file:///root/doc/* ] !-- ENTITIES BASE_DIR = this is the base of the whole doc tree including doctools Linux : file:///root/doc/ Win32 : ../../ -- !-- When changing the XSL version - make sure it is also changed in the xml.pro file -- catalog prefer=*public* xmlns=* urn:oasis:names:tc:entity:xmlns:xml:catalog* !-- DTD and stylesheet files installed under -- group xml:base=*BASE_DIR;* !-- configured above -- !--group prefer=public xml:base=file:///root/doc/ -- !-- UNIX/LINUX -- !-- group prefer=public xml:base=../../ -- !-- Windows -- 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*/ !-- Resolve DTD URL system ID to local file -- rewriteSystem systemIdStartString=* http://www.oasis-open.org/docbook/xml/4.4/* rewritePrefix=* doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*http://www.docbook.org/xml/4.4/* rewritePrefix=*doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*http://www.docbook.org/xml/4.5/* rewritePrefix=*doctools/DB_VER;/*/ rewriteSystem systemIdStartString=*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/* rewritePrefix=* doctools/XSL_VER;/*/ rewriteURI uriStartString=* http://docbook.sourceforge.net/release/slides/current/* rewritePrefix=* doctools/SLIDES_VER;/*/ rewriteURI uriStartString=* http://docbook.sourceforge.net/release/slides/* rewritePrefix=* doctools/SLIDES_VER;/*/ !-- To resolve short stylesheet references -- uri name=*html-docbook.xsl* uri=*doctools/XSL_VER;/html/docbook.xsl */ uri name=*chunk.xsl* uri=*doctools/XSL_VER;/html/chunk.xsl*/ uri name=*fo-docbook.xsl* uri=*doctools/XSL_VER;/fo/docbook.xsl*/ /group !-- Resolve DTD PUBLIC identifiers -- nextCatalog catalog=*file:///../../doctools/DB_VER;/catalog.xml*/ / catalog In a message dated 10/13/08 07:12:20 Pacific Daylight Time, [EMAIL PROTECTED] writes: Good afternoon all, I am trying to write a catalog file for my DocBook processing so all the paths that I need are in one place. At the moment I have limited success. I have pretty much lifted the Catalog file from 'Example DocBook catalog file' - http://www.sagehill.net/docbookxsl/ExampleCatalog.html and I have got the system to find my customisation stylesheet in the correct location. However when my file then tries to import the Docbook XSL file, it does it with the same path location as it did when it found my customisation, even though in my catalog I have a different path for this file. I am using xsltproc to produce my FO file, the command I am using is: XML_CATALOG_FILES=catalog.xml xsltproc -o output.focpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml If i re-run this command using fo-docbook.xsl instead it works perfectly and I get the FO, trouble is that it is not what I want. I have appened the Catalog file to the end of this email. Thanks, Russell ?xml version=1.0? !DOCTYPE catalog PUBLIC -//OASIS/DTD Entity Resolution XML Catalog V1.0//EN http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd; catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog group xml:base=file:///home/russells/workspace/cpsltdonline/docbook/ uri name=cpsltdonline.xsl uri=custom/cpsltdonline.xsl / uri name=cpsltdonline-order.xsl uri=styles/cpsltdonline-order.xsl / /group !-- DTD and stylesheet files installed under /usr/share/xml -- group xml:base=file:///usr/share/xml/ !-- Resolve DTD URL system ID to local file -- rewriteSystem
Re: DOCBOOK-APPS: Catalogs, URIResolver, and Java 1.4.x
Norman Walsh wrote: I banged my head *way* to long before a colleague pointed me to: I'm not sure if my English is good enough to understand this sentence, but if you wasn't able to get Xalan and XML resolver working under Java 1.4.1 I know that feeling *VERY EXACTLY*. I spent several hours trying even impossible combinations of classpath and -Djava.endorsed.dirs. One time I even forced Xalan to emit message that he is missing some class from Saxon (but there wasn't any Saxon JAR in classpath at that time). :-( I don't understand why Sun is shipping Java with Xalan and not with Saxon. From my experience Saxon is faster, had fewer bugs in recent history and has more features. Yes there is XSLTC compiler in Xalan, which may be usefull for speeding-up some simple transformations. But everytime someone reports bug related to HTML Help stylesheet and Xalan I feal big fear because I must get latest Xalan working. But now I'm hero because I had latest Xalan working with XML catalog support. WoW! Sorry for OT. Jirka -- - Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz