[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] Index Page: Insert Current Indexterm(s) in The Header
Hi, I think you want to customize the this template in fo/autoidx.xsl: xsl:template match=indexterm mode=index-primary ... fo:block xsl:if test=$axf.extensions != 0 xsl:attribute name=axf:suppress-duplicate-page-numbertrue/xsl:attribute /xsl:if !-- *** insert fo:marker here * -- xsl:value-of select=primary/ You need to put the fo:marker after any xsl:attribute lines and before any text content of the block. The context of this template is the indexterm, so you can select primary and secondary elements and combine them in the text of the marker. Then you'll need to customize the header.content template with the fo:retrieve-marker element to pick up the first or last marker on each page. Bob Stayton Sagehill Enterprises [EMAIL PROTECTED] - Original Message - From: Thomas Schraitle [EMAIL PROTECTED] To: docbook-apps@lists.oasis-open.org Sent: Saturday, October 11, 2008 2:19 AM Subject: [docbook-apps] Index Page: Insert Current Indexterm(s) in The Header Hi, following situation: I have a document with lots of indexterms which is transformed with the FO stylesheets and XEP to PDF. However, the stylesheets give me in the header of each page the page number and the word Index only. My idea was to integrate the primary and a secondary term (if available) into the header like this: -- DocBook(W3-Schema) -- Validation(RELAX NG) -- DocBook Fonts 123 Converting 32,43Avantgarde 123 DTD 45 Frutiger 124 Entities 34 Helvetica 156 Tables 45 Palatino 126 RELAX NG 45 Writing 23 Validation Validating 5DTD 45 W3C-Schema 46 RELAX NG 45 .. It would be really nice to have at least the primary indexterm in the header. I assume I have to insert a fo:marker element somewhere, and retrieve it in fo:static-content. The question is which of the templates should I adjust. Any ideas? Thanks, Tom -- Thomas Schraitle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]