[docbook] xinclude.mod
Hello list, i just would like to ask i can use xinclude.mod with DocBook 4.5. The backround: I have a project which is written in DB4.5. I'm using a Oxygen XML Editor for preparing the Code. But the validy fails with the error that xinclude isn't defined. In http://forums.deltaxml.com/topic/144/ i found out that a !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.docbook.org/xml/4.5/docbookx.dtd; [ !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.5/xinclude.mod; %xinclude; ] is possible. But on this place docbooc.org/xml/4.5/ a xinclude.mod isn't available. So it is moved to another place or can't we use it? Have a nice day Sascha -- Sincerly yours Sascha Manns Web: http://saigkill.homelinux.net - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org
Re: [docbook] xinclude.mod
HI Sascha, I'm investigating why that file is not on the docbook.org website. I'll let you know what I find out. I know that Oxygen supports XIncludes in DocBook 4, but it seems it should be referenced this way: !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.4/xinclude.mod; Note that it uses 4.4 instead of 4.5. That web address also does not have the file, but Oxygen's XML catalog maps it to the local file in the Oxygen installation: frameworks/docbook/dtd/4.4/xinclude.mod In fact, if you copy the xinclude.mod file from 4.4 to 4.5, then your original entity reference will work and the file will validate. As an alternate workaround, the following reference describes how you can add the XInclude elements to DocBook 4 yourself: http://www.sagehill.net/docbookxsl/ValidXinclude.html#XincludeDTD Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Sascha Manns saigk...@googlemail.com Sent: Wednesday, November 07, 2012 7:26 AM To: docbook@lists.oasis-open.org Subject: [docbook] xinclude.mod Hello list, i just would like to ask i can use xinclude.mod with DocBook 4.5. The backround: I have a project which is written in DB4.5. I'm using a Oxygen XML Editor for preparing the Code. But the validy fails with the error that xinclude isn't defined. In http://forums.deltaxml.com/topic/144/ i found out that a !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.docbook.org/xml/4.5/docbookx.dtd; [ !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.5/xinclude.mod; %xinclude; ] is possible. But on this place docbooc.org/xml/4.5/ a xinclude.mod isn't available. So it is moved to another place or can't we use it? Have a nice day Sascha -- Sincerly yours Sascha Manns Web: http://saigkill.homelinux.net - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org
[docbook] Re: xinclude.mod
Sascha Manns saigk...@googlemail.com writes: i just would like to ask i can use xinclude.mod with DocBook 4.5. The backround: I have a project which is written in DB4.5. I'm using a Oxygen XML Editor for preparing the Code. But the validy fails with the error that xinclude isn't defined. In http://forums.deltaxml.com/topic/144/ i found out that a !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.docbook.org/xml/4.5/docbookx.dtd; [ !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.5/xinclude.mod; %xinclude; ] is possible. But on this place docbooc.org/xml/4.5/ a xinclude.mod isn't available. That's someone else's extension to DocBook. It's unfortunate that they chose a docbook.org URI for their system identifier (there's clearly a catalog involved so the fact that it was never stored there didn't prevent it from working). So it is moved to another place or can't we use it? It appears to ship as part of the Oxygen distribution, so you probably already have a copy. Look in {wherever Oxygen is installed}/frameworks/docbook/4.4/dtd/xinclude.mod Hope that helps. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | One does what one is; one becomes http://www.oasis-open.org/docbook/ | what one does.--Robert Musil Chair, DocBook Technical Committee | pgp1UCqH4VPc7.pgp Description: PGP signature
Re: [docbook] xinclude.mod
Apparently the Oxygen folks created xinclude.mod, as it is not a part of the standard distribution of the DocBook DTD. That's why it is not on the docbook.org website. Oxygen uses an XML catalog to remap that address to the local Oxygen distribution. In the case of 4.5, it appears it was accidentally omited from the directory. You might ask Oxygen about that. Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Bob Stayton b...@sagehill.net Sent: Wednesday, November 07, 2012 10:06 AM To: Sascha Manns saigk...@googlemail.com; docbook@lists.oasis-open.org Subject: Re: [docbook] xinclude.mod HI Sascha, I'm investigating why that file is not on the docbook.org website. I'll let you know what I find out. I know that Oxygen supports XIncludes in DocBook 4, but it seems it should be referenced this way: !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.4/xinclude.mod; Note that it uses 4.4 instead of 4.5. That web address also does not have the file, but Oxygen's XML catalog maps it to the local file in the Oxygen installation: frameworks/docbook/dtd/4.4/xinclude.mod In fact, if you copy the xinclude.mod file from 4.4 to 4.5, then your original entity reference will work and the file will validate. As an alternate workaround, the following reference describes how you can add the XInclude elements to DocBook 4 yourself: http://www.sagehill.net/docbookxsl/ValidXinclude.html#XincludeDTD Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Sascha Manns saigk...@googlemail.com Sent: Wednesday, November 07, 2012 7:26 AM To: docbook@lists.oasis-open.org Subject: [docbook] xinclude.mod Hello list, i just would like to ask i can use xinclude.mod with DocBook 4.5. The backround: I have a project which is written in DB4.5. I'm using a Oxygen XML Editor for preparing the Code. But the validy fails with the error that xinclude isn't defined. In http://forums.deltaxml.com/topic/144/ i found out that a !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.docbook.org/xml/4.5/docbookx.dtd; [ !ENTITY % xinclude SYSTEM http://www.docbook.org/xml/4.5/xinclude.mod; %xinclude; ] is possible. But on this place docbooc.org/xml/4.5/ a xinclude.mod isn't available. So it is moved to another place or can't we use it? Have a nice day Sascha -- Sincerly yours Sascha Manns Web: http://saigkill.homelinux.net - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org
Re: [docbook] xinclude.mod
Hello Bob and Norman, Bob Stayton wrote at Mittwoch, 7. November 2012, 11:02:04: Apparently the Oxygen folks created xinclude.mod, as it is not a part of the standard distribution of the DocBook DTD. That's why it is not on the docbook.org website. Oxygen uses an XML catalog to remap that address to the local Oxygen distribution. In the case of 4.5, it appears it was accidentally omited from the directory. You might ask Oxygen about that. Thank you both for clarifying this point. :-) -- Sincerly yours Sascha Manns Web: http://saigkill.homelinux.net - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org
[docbook-apps] Different column.count.index for different indexes
Hello, with the parameter column.count.index you can specify the number of columns for all indexes. But is it possible to define this number specific for different indexes? E.g.: index type='long_names'/ with 1 column and index type='short_names'/ with 2 columns? THANKS Mit freundlichen Grüßen / Kind regards / S pozdravem Steffen Wagner, VoyagerSoft wag...@voyagersoft.de ZF Friedrichshafen AG 88038 Friedrichshafen, Deutschland/Germany Telefon/Phone +49 7541 77-7644 steffen.wagner.h...@zf.com Software Consultant Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. Giorgio Behr Vorstand/Board of Management: Hans-Georg Härter (Vorsitzender/CEO), Dr. Stefan Sommer, Dr. Konstantin Sauer, Dr. Peter Ottenbruch, Jürgen Holeksa, Dr. Gerhard Wagner, Reinhard Buhl, Rolf Lutz, Wilhelm Rehm Sitz/Headquarters: Friedrichshafen Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the municipal court of Ulm HRB 630206 - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] DocBook chunk.xsl resolves path to docbook.xsl incorrectly with Xalan (with Windows, but not with *nix)
Hello, I'm observing a strange problem, where I use the html/chunk.xsl stylesheet via Ant and the xslt task. It works under Linux (Ubuntu 12.04) and Mac OS X 10.8, but not under Windows. The problem seems to be that (as expected) under *nix, the chunk.xsl imports the docbook.xsl stylesheet (in the same directory, because there's no directory in the XSLT, which is correct), but under Windows it resolves against the basedir of Ant and not the basedir of the XSLT task. I'm using: - DocBook HTML stylesheets 1.76.1 - Ant 1.8.4 - Java 6.0 u37 - Xalan 2.7.1 Here's the relevant bit of my build.xml file (${vbuild} is an absolute path): xslt basedir=${vbuild}/docbook/src/${l10n} style=${vbuild}/docbook/custom/${l10n}/custom-html.xsl destdir=${vbuild}/docbook/out/${l10n} extension=.html includes=*.xml classpath refid=xalan.classpath/ /xslt xalan.classpath includes: resolver.jar, serializer.jar, xalan.jar, xercesImpl.jar Here's the output from Ant: [xslt] Transforming into c:\java\build\temp\ProjectName\docbook\out\en [xslt] Processing c:\java\build\temp\ProjectName\docbook\src\en\manual.xml to c:\java\build\temp\ProjectName\docbook\out\en\manual.html [xslt] Loading stylesheet c:\java\build\temp\ProjectName\docbook\custom\en\custom-html.xsl [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:25:33: Error! Had IO Exception with stylesheet file: docbook.xsl Cause: java.io.FileNotFoundException: C:\java\projects\ProjectName\docbook.xsl (The system cannot find the file specified) [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:32:38: Error! Had IO Exception with stylesheet file: chunk-common.xsl Cause: java.io.FileNotFoundException: C:\java\projects\ProjectName\chunk-common.xsl (The system cannot find the file specified) [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:50:37: Error! Had IO Exception with stylesheet file: chunk-code.xsl Cause: java.io.FileNotFoundException: C:\java\projects\viewshell\chunk-code.xsl (The system cannot find the file specified) Like I say, it works under *nix but not under Windows. I can't see what needs configuring so that under Windows, the chunk.xsl looks in the same directory as itself for docbook.xsl. I've not modified the standard docbook files. My custom-html.xsl customization layer contains this import on *nix (first line) and Windows (second line) : xsl:import href=/Users/cbr/dev/build/temp/ProductName/docbook-xsl-1.76.1/html/chunk.xsl/ xsl:import href=c:\java\build\temp\ProductName\docbook-xsl-1.76.1\html\chunk.xsl/ ...the path is hard-coded into this file as part of the build process (ant copy, filtering on). On all platforms, custom-html.xsl finds chunk.xsl, but on Windows, chunk.xsl can't find docbook.xsl. Thanks, Christopher
Re: [docbook-apps] Different column.count.index for different indexes
Hi Steffan, No, it is not possible to specify different column counts for different indexes with just that param. This would require defining a set of custom page-masters for index that specify the column count with a call to a custom template: Replace this: fo:region-body margin-bottom={$body.margin.bottom} margin-top={$body.margin.top} column-gap={$column.gap.index} column-count={$column.count.index} with this: fo:region-body margin-bottom={$body.margin.bottom} margin-top={$body.margin.top} column-gap={$column.gap.index} xsl:attribute name=column-count xsl:call-template name=index.column.count/ /xsl:attribute And then define a template named 'index.column.count' that resolves to an integer based on the @type attribute, something like this: xsl:template name=index.column.count xsl:choose xsl:when test=@type = 'long_names'1/xsl:when xsl:otherwise2/xsl:otherwise /xsl:choose /xsl:template For more help on creating and calling custom page masters, see: http://www.sagehill.net/docbookxsl/PageDesign.html#DeclarePageMasters Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: steffen.wagner.h...@zf.com Sent: Wednesday, November 07, 2012 5:43 AM To: docbook-apps@lists.oasis-open.org Subject: [docbook-apps] Different column.count.index for different indexes Hello, with the parameter column.count.index you can specify the number of columns for all indexes. But is it possible to define this number specific for different indexes? E.g.: index type='long_names'/ with 1 column and index type='short_names'/ with 2 columns? THANKS Mit freundlichen Grüßen / Kind regards / S pozdravem Steffen Wagner, VoyagerSoft wag...@voyagersoft.de ZF Friedrichshafen AG 88038 Friedrichshafen, Deutschland/Germany Telefon/Phone +49 7541 77-7644 steffen.wagner.h...@zf.com Software Consultant Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. Giorgio Behr Vorstand/Board of Management: Hans-Georg Härter (Vorsitzender/CEO), Dr. Stefan Sommer, Dr. Konstantin Sauer, Dr. Peter Ottenbruch, Jürgen Holeksa, Dr. Gerhard Wagner, Reinhard Buhl, Rolf Lutz, Wilhelm Rehm Sitz/Headquarters: Friedrichshafen Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the municipal court of Ulm HRB 630206 - 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
Re: [docbook-apps] Generation custom list of *something* in DocBook 5.0
Hi Steffan, This would require customization. The List of pages are generated with the following templates that would require customization: For FO output, the template named 'make.book.tocs' in fo/division.xsl For HTML output, the template named 'make.lots' in html/autotoc.xsl These templates call 'list.of.titles' to generate each list. Since 'list.of.titles' operates on elements that contain title elements, it would not work directly with remark elements. So that would also need customization. Also, the template for remark would need to be customized to output an id attribute so that a page reference could find it. Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: steffen.wagner.h...@zf.com Sent: Wednesday, November 07, 2012 5:06 AM To: docbook-apps@lists.oasis-open.org Subject: [docbook-apps] Generation custom list of *something* in DocBook 5.0 Hello, we want to generate for special elements - for example for all remark elements - an separate list of ... like list of content, list of tables (in this case a list of remarks), ... For index it's easy to generate a custom index, but how to generate a new list of ...? A also found how to add a new element to an existing list, but not to a new list. THANKS Steffen Mit freundlichen Grüßen / Kind regards / S pozdravem Steffen Wagner, VoyagerSoft wag...@voyagersoft.de ZF Friedrichshafen AG 88038 Friedrichshafen, Deutschland/Germany Telefon/Phone +49 7541 77-7644 steffen.wagner.h...@zf.com Software Consultant Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. Giorgio Behr Vorstand/Board of Management: Hans-Georg Härter (Vorsitzender/CEO), Dr. Stefan Sommer, Dr. Konstantin Sauer, Dr. Peter Ottenbruch, Jürgen Holeksa, Dr. Gerhard Wagner, Reinhard Buhl, Rolf Lutz, Wilhelm Rehm Sitz/Headquarters: Friedrichshafen Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the municipal court of Ulm HRB 630206 - 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
Re: [docbook-apps] Adding a border around a DocBook imageobject in PDF output
Indeed, there is not an attribute-set for mediaobject itself. I suspect that because there are so many attributes on the graphics elements that must be supported, that another attribute-set might introduce complicated interactions. Fortunately, there is an easy way to get a border. Any time you want to add features outside of an element itself, you can use xsl:apply-imports. Try this: xsl:template match=mediaobject fo:block border=0.5pt solid black xsl:apply-imports/ /fo:block /xsl:template This will add a fo:block container with a border, and put the image inside it. Unless you have already customized the template matching on mediaobject, the apply-imports will fall back to the original DocBook template for it. Bob Stayton Sagehill Enterprises b...@sagehill.net From: Christopher BROWN Sent: Wednesday, November 07, 2012 9:08 AM To: DocBook Apps list Subject: [docbook-apps] Adding a border around a DocBook imageobject in PDF output Hello, I have some screenshots to include as part of a user manual I'm compiling with DocBook, and several are on white backgrounds and contain mainly text, so doesn't mix well with other text layout on the page. I tried to find out how to add a border by regarding DocBook XSL documentation, specifically: - http://www.sagehill.net/docbookxsl/BordersAndShading.html - http://www.sagehill.net/docbookxsl/Graphics.html ..and the best I could do was following the second link, add a border around the figure element (so it not only goes around the image, but also around the title, leaving a lot of whitespace around the image). I then tried working out how add borders using the first link instead, so that I'd only outline the image itself, but none of mediaobject, imageobject, or imagedata appear in the list of elements that recognize the attribute-sets referred to there. A little further on, it says you will want to find out where the outer fo:block is output... but I don't know what I'm looking for based on that advice, nor how to find it, nor what to do with it (I'm a bit worried that I might accidentally clobber something too by matching the template in a higher-precedence customization layer). Thanks, Christopher
Re: [docbook-apps] epub heading levels and centered images
Are you viewing the output in an Ebook reader or a web browser? It works in the web browsers I tried. Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Andreas F.X. Siegert a...@afximages.com Sent: Tuesday, November 06, 2012 2:43 PM To: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] epub heading levels and centered images Hello Bob, looks like something else is amiss on my side I tried this and other variants (after googling CSS table centering) and I still can not get images centered. table style=margin: 0 auto; width: 80%; cellpadding: 0; cellspacing: 0; Does not change anything here. puzzled afx on 06.11.2012 01:30 Bob Stayton said the following: Well, this is one of those things I do not understand about CSS. Apparently, one centers a table in CSS not with text-align, but with this style: margin: 0 auto; If you add that to the style attribute on the table, the table (and image) will be centered. The table is used here to create a viewport for a centered and scaled image. Now I need to figure out how to incorporate this extra style information into the stylesheet. Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Andreas F.X. Siegert a...@afximages.com Sent: Monday, November 05, 2012 11:08 AM To: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] epub heading levels and centered images on 05.11.2012 04:52 Bob Stayton said the following: Hi Andreas, You seem to have downloaded the doc archive, not the xsl archive itself. You want docbook-xsl-1.77.1.zip. Ahh, thanks for clearing that up. Here is what I get running against chunk.xsl when I run it after installing the docbook update. div class=figure id=FigCMOverview div class=figure-titleFigure 3.1. AfterShot color management overview/div div class=figure-contents div style=text-align: center; class=mediaobject table style=border: 0; width: 80%; cellpadding: 0; cellspacing: 0; tr td style=text-align: center; img style=text-align: middle; width: 100%; src=images/CM-Overview.png alt=AfterShot color management overview/ /td /tr /table /div /div /div Which is consistent with what I get using my customization layer. Still no centered image ;-( I've put a test setup at http://afximages.com/tmp/epub-test.tgz if you would like to have a look. thx afx -- http://afximages.com/ - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org -- http://afximages.com/ - 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
Re: [docbook-apps] DocBook chunk.xsl resolves path to docbook.xsl incorrectly with Xalan (with Windows, but not with *nix)
It is possible that Xalan is confused by the Windows pathname syntax: xsl:import href=c:\java\build\temp\ProductName\docbook-xsl-1.76.1\html\chunk.xsl/ I would try: xsl:import href=file:///c:/java/build/temp/ProductName/docbook-xsl-1.76.1/html/chunk.xsl/ Bob Stayton Sagehill Enterprises b...@sagehill.net From: Christopher BROWN Sent: Wednesday, November 07, 2012 8:42 AM To: DocBook Apps list Subject: [docbook-apps] DocBook chunk.xsl resolves path to docbook.xsl incorrectly with Xalan (with Windows, but not with *nix) Hello, I'm observing a strange problem, where I use the html/chunk.xsl stylesheet via Ant and the xslt task. It works under Linux (Ubuntu 12.04) and Mac OS X 10.8, but not under Windows. The problem seems to be that (as expected) under *nix, the chunk.xsl imports the docbook.xsl stylesheet (in the same directory, because there's no directory in the XSLT, which is correct), but under Windows it resolves against the basedir of Ant and not the basedir of the XSLT task. I'm using: - DocBook HTML stylesheets 1.76.1 - Ant 1.8.4 - Java 6.0 u37 - Xalan 2.7.1 Here's the relevant bit of my build.xml file (${vbuild} is an absolute path): xslt basedir=${vbuild}/docbook/src/${l10n} style=${vbuild}/docbook/custom/${l10n}/custom-html.xsl destdir=${vbuild}/docbook/out/${l10n} extension=.html includes=*.xml classpath refid=xalan.classpath/ /xslt xalan.classpath includes: resolver.jar, serializer.jar, xalan.jar, xercesImpl.jar Here's the output from Ant: [xslt] Transforming into c:\java\build\temp\ProjectName\docbook\out\en [xslt] Processing c:\java\build\temp\ProjectName\docbook\src\en\manual.xml to c:\java\build\temp\ProjectName\docbook\out\en\manual.html [xslt] Loading stylesheet c:\java\build\temp\ProjectName\docbook\custom\en\custom-html.xsl [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:25:33: Error! Had IO Exception with stylesheet file: docbook.xsl Cause: java.io.FileNotFoundException: C:\java\projects\ProjectName\docbook.xsl (The system cannot find the file specified) [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:32:38: Error! Had IO Exception with stylesheet file: chunk-common.xsl Cause: java.io.FileNotFoundException: C:\java\projects\ProjectName\chunk-common.xsl (The system cannot find the file specified) [xslt] c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:50:37: Error! Had IO Exception with stylesheet file: chunk-code.xsl Cause: java.io.FileNotFoundException: C:\java\projects\viewshell\chunk-code.xsl (The system cannot find the file specified) Like I say, it works under *nix but not under Windows. I can't see what needs configuring so that under Windows, the chunk.xsl looks in the same directory as itself for docbook.xsl. I've not modified the standard docbook files. My custom-html.xsl customization layer contains this import on *nix (first line) and Windows (second line) : xsl:import href=/Users/cbr/dev/build/temp/ProductName/docbook-xsl-1.76.1/html/chunk.xsl/ xsl:import href=c:\java\build\temp\ProductName\docbook-xsl-1.76.1\html\chunk.xsl/ ...the path is hard-coded into this file as part of the build process (ant copy, filtering on). On all platforms, custom-html.xsl finds chunk.xsl, but on Windows, chunk.xsl can't find docbook.xsl. Thanks, Christopher
Re: [docbook-apps] epub heading levels and centered images
on 07.11.2012 20:19 Bob Stayton said the following: Are you viewing the output in an Ebook reader or a web browser? It works in the web browsers I tried. I am using the EPubreader extension in Firefox as well as Azardi and Calibre (Okular barfs on the file...). cheers afx -- http://afximages.com/ - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Adding a border around a DocBook imageobject in PDF output
That does indeed get me the border, so much appreciated. However, to tweak it just a little more... I had set up my images to be 90% of page width, like this: figure pgwide=1 titlesome caption/title mediaobject role=screenshot imageobject imagedata fileref=media/usrprf.export1.png scalefit=1 align=centerwidth =90%/ /imageobject /mediaobject /figure ...and your suggested example draws the border full page width. I tried fiddling with the template, like this : xsl:template match=mediaobject[@role='screenshot'] fo:block border=0.5pt solid black width=90% xsl:apply-imports/ /fo:block /xsl:template ...but the 90% in the fo:block is apparently not used. So I have empty white borders either side, within the outline. I can of course make the images 100% wide but that scales them vertically too, using excessive paper area. Also, I'm a little uneasy about forcing 90% anyway on the template, I'd like it to stick to the image if possible. What solutions should I consider? Thanks, Christopher On 7 November 2012 20:12, Bob Stayton b...@sagehill.net wrote: ** Indeed, there is not an attribute-set for mediaobject itself. I suspect that because there are so many attributes on the graphics elements that must be supported, that another attribute-set might introduce complicated interactions. Fortunately, there is an easy way to get a border. Any time you want to add features outside of an element itself, you can use xsl:apply-imports. Try this: xsl:template match=mediaobject fo:block border=0.5pt solid black xsl:apply-imports/ /fo:block /xsl:template This will add a fo:block container with a border, and put the image inside it. Unless you have already customized the template matching on mediaobject, the apply-imports will fall back to the original DocBook template for it. Bob Stayton Sagehill Enterprises b...@sagehill.net *From:* Christopher BROWN br...@reflexe.fr *Sent:* Wednesday, November 07, 2012 9:08 AM *To:* DocBook Apps list docbook-apps@lists.oasis-open.org *Subject:* [docbook-apps] Adding a border around a DocBook imageobject in PDF output Hello, I have some screenshots to include as part of a user manual I'm compiling with DocBook, and several are on white backgrounds and contain mainly text, so doesn't mix well with other text layout on the page. I tried to find out how to add a border by regarding DocBook XSL documentation, specifically: - http://www.sagehill.net/docbookxsl/BordersAndShading.html - http://www.sagehill.net/docbookxsl/Graphics.html ..and the best I could do was following the second link, add a border around the figure element (so it not only goes around the image, but also around the title, leaving a lot of whitespace around the image). I then tried working out how add borders using the first link instead, so that I'd only outline the image itself, but none of mediaobject, imageobject, or imagedata appear in the list of elements that recognize the attribute-sets referred to there. A little further on, it says you will want to find out where the outer fo:block is output... but I don't know what I'm looking for based on that advice, nor how to find it, nor what to do with it (I'm a bit worried that I might accidentally clobber something too by matching the template in a higher-precedence customization layer). Thanks, Christopher
Re: [docbook-apps] Adding a border around a DocBook imageobject in PDF output
OK, I thought that might be too simple. 8^) If you want the border to match the image size, you'll need to put the border on the fo:external-graphic element. Unfortunately, that means you need to copy and customize the template named 'process.image' from fo/graphics.xsl. That is currently a large template that handles a lot of attributes. But adding your border attribute should be no problem. Bob Stayton Sagehill Enterprises b...@sagehill.net From: Christopher BROWN Sent: Wednesday, November 07, 2012 3:20 PM To: DocBook Apps list Subject: Re: [docbook-apps] Adding a border around a DocBook imageobject in PDF output That does indeed get me the border, so much appreciated. However, to tweak it just a little more... I had set up my images to be 90% of page width, like this: figure pgwide=1 titlesome caption/title mediaobject role=screenshot imageobject imagedata fileref=media/usrprf.export1.png scalefit=1 align=center width=90%/ /imageobject /mediaobject /figure ...and your suggested example draws the border full page width. I tried fiddling with the template, like this : xsl:template match=mediaobject[@role='screenshot'] fo:block border=0.5pt solid black width=90% xsl:apply-imports/ /fo:block /xsl:template ...but the 90% in the fo:block is apparently not used. So I have empty white borders either side, within the outline. I can of course make the images 100% wide but that scales them vertically too, using excessive paper area. Also, I'm a little uneasy about forcing 90% anyway on the template, I'd like it to stick to the image if possible. What solutions should I consider? Thanks, Christopher On 7 November 2012 20:12, Bob Stayton b...@sagehill.net wrote: Indeed, there is not an attribute-set for mediaobject itself. I suspect that because there are so many attributes on the graphics elements that must be supported, that another attribute-set might introduce complicated interactions. Fortunately, there is an easy way to get a border. Any time you want to add features outside of an element itself, you can use xsl:apply-imports. Try this: xsl:template match=mediaobject fo:block border=0.5pt solid black xsl:apply-imports/ /fo:block /xsl:template This will add a fo:block container with a border, and put the image inside it. Unless you have already customized the template matching on mediaobject, the apply-imports will fall back to the original DocBook template for it. Bob Stayton Sagehill Enterprises b...@sagehill.net From: Christopher BROWN Sent: Wednesday, November 07, 2012 9:08 AM To: DocBook Apps list Subject: [docbook-apps] Adding a border around a DocBook imageobject in PDF output Hello, I have some screenshots to include as part of a user manual I'm compiling with DocBook, and several are on white backgrounds and contain mainly text, so doesn't mix well with other text layout on the page. I tried to find out how to add a border by regarding DocBook XSL documentation, specifically: - http://www.sagehill.net/docbookxsl/BordersAndShading.html - http://www.sagehill.net/docbookxsl/Graphics.html ..and the best I could do was following the second link, add a border around the figure element (so it not only goes around the image, but also around the title, leaving a lot of whitespace around the image). I then tried working out how add borders using the first link instead, so that I'd only outline the image itself, but none of mediaobject, imageobject, or imagedata appear in the list of elements that recognize the attribute-sets referred to there. A little further on, it says you will want to find out where the outer fo:block is output... but I don't know what I'm looking for based on that advice, nor how to find it, nor what to do with it (I'm a bit worried that I might accidentally clobber something too by matching the template in a higher-precedence customization layer). Thanks, Christopher