[docbook-apps] including non-xml
Problem. I'm documenting a bash script. I don't want to include it physically in the docbook file, then escape the three symbols. Is there a way I can xInclude it into a CDATA section please? Anyone been there and done that? regards -- Dave Pawson XSLT XSL-FO docbook FAQ. http://www.dpawson.co.uk docb -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - 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] including non-xml
I think this is what you want: http://www.sagehill.net/docbookxsl/ModularDoc.html#XIncludePlainText S On Mon, Apr 26, 2010 at 11:27 AM, Dave Pawson da...@dpawson.co.uk wrote: Problem. I'm documenting a bash script. I don't want to include it physically in the docbook file, then escape the three symbols. Is there a way I can xInclude it into a CDATA section please? Anyone been there and done that? regards -- Dave Pawson XSLT XSL-FO docbook FAQ. http://www.dpawson.co.uk docb -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - 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] including non-xml
On a similar matter, does anyone know if it is possible to include only a part of a file? In case of a book on programming, for example, I want to keep all examples separate (which would allow me to easily perform syntax checks, and maintain them separately), but include only certain parts in the book (complete examples will usually include much more stuff than necessary to reproduce in a book). I looked around for a solution, but couldn't find anything. I have an idea to hack something together that would allow me to specify the fragment coordinates in the URL. For example: programlistingxi:include href=codesample.c?startMarker=XXXendMarker=YYY parse=text xmlns:xi=http://www.w3.org/2001/XInclude; //programlisting Comments, pointers and suggestions are welcome. On Mon, Apr 26, 2010 at 11:34 AM, Samuel Wright lykosz...@gmail.com wrote: I think this is what you want: http://www.sagehill.net/docbookxsl/ModularDoc.html#XIncludePlainText S On Mon, Apr 26, 2010 at 11:27 AM, Dave Pawson da...@dpawson.co.uk wrote: Problem. I'm documenting a bash script. I don't want to include it physically in the docbook file, then escape the three symbols. Is there a way I can xInclude it into a CDATA section please? Anyone been there and done that? regards -- Dave Pawson XSLT XSL-FO docbook FAQ. http://www.dpawson.co.uk docb -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org -- Ivan Ristic ModSecurity Handbook [http://www.modsecurityhandbook.com] SSL Labs [https://www.ssllabs.com/ssldb/] - 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] including non-xml
On Mon, 26 Apr 2010 11:41:13 +0100 Ivan Ristic ivan.ris...@gmail.com wrote: On a similar matter, does anyone know if it is possible to include only a part of a file? In case of a book on programming, for example, I want to keep all examples separate (which would allow me to easily perform syntax checks, and maintain them separately), but include only certain parts in the book (complete examples will usually include much more stuff than necessary to reproduce in a book). I looked around for a solution, but couldn't find anything. I have an idea to hack something together that would allow me to specify the fragment coordinates in the URL. For example: programlistingxi:include href=codesample.c?startMarker=XXXendMarker=YYY parse=text xmlns:xi=http://www.w3.org/2001/XInclude; //programlisting Comments, pointers and suggestions are welcome. If your source (C code whatever) can be 'partitioned' in some way, that might help? I don't think xslt can help you with non-xml 'selection' HTH - and Thanks Samual. Bob to the rescue again :-) -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - 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] including non-xml
Ivan Ristic wrote: I looked around for a solution, but couldn't find anything. I have an idea to hack something together that would allow me to specify the fragment coordinates in the URL. For example: programlistingxi:include href=codesample.c?startMarker=XXXendMarker=YYY parse=text xmlns:xi=http://www.w3.org/2001/XInclude; //programlisting Comments, pointers and suggestions are welcome. I see two possible approaches: 1. Make selection during XIncluding -- probably using custom URI resolver or supporting custom XPointer scheme 2. Do selection during XSLT. Requested range can be coded in some effectivity attribute, e.g. programlisting condition=20-44/programlisting -- -- Jirka Kosek e-mail: ji...@kosek.cz http://xmlguru.cz -- Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing -- OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member -- signature.asc Description: OpenPGP digital signature
[docbook-apps] epub generation
Hello All, I'm trying to use the ThreePress python scripts which call the docbook/epub xslt. It should be possible to use a custom stylesheet which import the epub.xslt file. And I have a trouble with my informaltable : lxml.etree.XSLTApplyError: No adjustColumnWidths function available. I know what to do with Xalan or Saxon in this case, but with python and those script, I don't. Is there any body who can help me ? Thanks in advance, Jacques - 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] epub generation
Hi Jacques, I think you'll find help more quickly with lxml on the lxml mailing list. lxml-...@codespeak.net good luck, --Tim -Original Message- From: Jacques Foucry [mailto:jacq...@foucry.net] Sent: Monday, April 26, 2010 10:21 AM To: docbook-apps Subject: [docbook-apps] epub generation Hello All, I'm trying to use the ThreePress python scripts which call the docbook/epub xslt. It should be possible to use a custom stylesheet which import the epub.xslt file. And I have a trouble with my informaltable : lxml.etree.XSLTApplyError: No adjustColumnWidths function available. I know what to do with Xalan or Saxon in this case, but with python and those script, I don't. Is there any body who can help me ? Thanks in advance, Jacques - 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
[docbook-apps] Re: including non-xml
On 04/26/10 05:41, Ivan Ristic wrote: On a similar matter, does anyone know if it is possible to include only a part of a file? No. To quote the link that Samuel gave: Since the included text is not XML, you cannot use an xpointer attribute with XPointer syntax to select part of it. You can only select the entire file's content. In case of a book on programming, for example, I want to keep all examples separate (which would allow me to easily perform syntax checks, and maintain them separately), but include only certain parts in the book (complete examples will usually include much more stuff than necessary to reproduce in a book). Ok, this makes sense enough. I looked around for a solution, but couldn't find anything. I have an idea to hack something together that would allow me to specify the fragment coordinates in the URL. For example: ... Comments, pointers and suggestions are welcome. Can you not have all your examples in separate source files? You might need a pre-processor to include them together when compiling your source code. Can you compile your source code as is or are some of the sections duplicate? Grant. . . . - 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] Re: including non-xml
On Mon, 26 Apr 2010 16:25:49 -0500, Grant Taylor gtay...@riverviewtech.net wrote: Can you not have all your examples in separate source files? You might need a pre-processor to include them together when compiling your source code. Can you compile your source code as is or are some of the sections duplicate? Sounds like a job for Literate Programming. Instead of keeping your source code and examples in external file(s), keep them in your DocBook document, and extract them automagically to produce the source code in the programming language. The implementation that Norm Walsh did several years back, for an earlier version of DocBook, can easily be adapted to DB5. It assumes you only want to get a single source code file out, but could easily be adopted to allow for extracting (tangling) multiple output files. We're using this for grammars of natural languages; the individual grammar rules scattered throughout our prose grammar get tangled into an XML document, which we further process into another target language. But the tangled doc can be in any programming language. Mike Maxwell - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org