[docbook-apps] part should become appendix in another book
Hi, I use xinclude to include certain documents in different books. In a certain context I want to use it as part in another as appendix. I tried to remove the top level node with the following to my customization layer: !-- Remove all sections marked with wrapper -- xsl:template match=part[@role='wrapper'] mode=profile xsl:apply-templates select=part mode=profile / /xsl:template And include it into the books like this: part titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=820_gerrit.xml / /part or appendix titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=820_gerrit.xml / /appendix Unfortunately my customization removes not only the top level part element but the whole part. Is anyone aware of a nice trick to replace part in some books with appendix? Best regards, Lars P.S. What I would like to have is the equivalent of the merge node for defining Android layouts, this node is only their to have a valid XML file, but is removed during the include process.
Re: [docbook-apps] part should become appendix in another book
Hi Frank, thanks, xpointers sound very useful. I tried it but my self-written xinclude Apache Ant task does not support xpointers. Is anyone aware of an existing Ant xinclude task which has support for xpointers? Best regards, Lars 2015-08-19 15:04 GMT+02:00 Frank Arensmeier farensme...@gmail.com: Hi there! There is probably some XLST foo out there that does what you want. I’d like to suggest an other approach. Have a look at Xpointers for the x:include element. The attribute xpointer on that element defines an xpath expression (kind of) that is used to select only parts of the document you want to include. http://www.sagehill.net/docbookxsl/ModularDoc.html#UsingXinclude See e.g. Selecting part of a file. However, your tool chain must support xpointers (not sure if xproc has suport for the full power of xpointers). Hope this helps! Regards /frank 19 aug 2015 kl. 14:21 skrev Lars Vogel lars.vo...@gmail.com: Hi, I use xinclude to include certain documents in different books. In a certain context I want to use it as part in another as appendix. I tried to remove the top level node with the following to my customization layer: !-- Remove all sections marked with wrapper -- xsl:template match=part[@role='wrapper'] mode=profile xsl:apply-templates select=part mode=profile / /xsl:template And include it into the books like this: part titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=820_gerrit.xml / /part or appendix titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=820_gerrit.xml / /appendix Unfortunately my customization removes not only the top level part element but the whole part. Is anyone aware of a nice trick to replace part in some books with appendix? Best regards, Lars P.S. What I would like to have is the equivalent of the merge node for defining Android layouts, this node is only their to have a valid XML file, but is removed during the include process.
Re: [docbook-apps] part should become appendix in another book
Hi there! There is probably some XLST foo out there that does what you want. I’d like to suggest an other approach. Have a look at Xpointers for the x:include element. The attribute xpointer on that element defines an xpath expression (kind of) that is used to select only parts of the document you want to include. http://www.sagehill.net/docbookxsl/ModularDoc.html#UsingXinclude http://www.sagehill.net/docbookxsl/ModularDoc.html#UsingXinclude See e.g. Selecting part of a file. However, your tool chain must support xpointers (not sure if xproc has suport for the full power of xpointers). Hope this helps! Regards /frank 19 aug 2015 kl. 14:21 skrev Lars Vogel lars.vo...@gmail.com: Hi, I use xinclude to include certain documents in different books. In a certain context I want to use it as part in another as appendix. I tried to remove the top level node with the following to my customization layer: !-- Remove all sections marked with wrapper -- xsl:template match=part[@role='wrapper'] mode=profile xsl:apply-templates select=part mode=profile / /xsl:template And include it into the books like this: part titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude http://www.w3.org/2001/XInclude href=820_gerrit.xml / /part or appendix titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude http://www.w3.org/2001/XInclude href=820_gerrit.xml / /appendix Unfortunately my customization removes not only the top level part element but the whole part. Is anyone aware of a nice trick to replace part in some books with appendix? Best regards, Lars P.S. What I would like to have is the equivalent of the merge node for defining Android layouts, this node is only their to have a valid XML file, but is removed during the include process.
Re: [docbook-apps] part should become appendix in another book
Just a quick heads-up. I just stumbled upon an old thread on this list dealing with more or less the same problem as you have. http://comments.gmane.org/gmane.text.docbook.apps/29005 http://comments.gmane.org/gmane.text.docbook.apps/29005 Maybe worth reading? /frank 19 aug 2015 kl. 15:20 skrev Lars Vogel lars.vo...@gmail.com: Hi Frank, thanks, xpointers sound very useful. I tried it but my self-written xinclude Apache Ant task does not support xpointers. Is anyone aware of an existing Ant xinclude task which has support for xpointers? Best regards, Lars 2015-08-19 15:04 GMT+02:00 Frank Arensmeier farensme...@gmail.com mailto:farensme...@gmail.com: Hi there! There is probably some XLST foo out there that does what you want. I’d like to suggest an other approach. Have a look at Xpointers for the x:include element. The attribute xpointer on that element defines an xpath expression (kind of) that is used to select only parts of the document you want to include. http://www.sagehill.net/docbookxsl/ModularDoc.html#UsingXinclude http://www.sagehill.net/docbookxsl/ModularDoc.html#UsingXinclude See e.g. Selecting part of a file. However, your tool chain must support xpointers (not sure if xproc has suport for the full power of xpointers). Hope this helps! Regards /frank 19 aug 2015 kl. 14:21 skrev Lars Vogel lars.vo...@gmail.com mailto:lars.vo...@gmail.com: Hi, I use xinclude to include certain documents in different books. In a certain context I want to use it as part in another as appendix. I tried to remove the top level node with the following to my customization layer: !-- Remove all sections marked with wrapper -- xsl:template match=part[@role='wrapper'] mode=profile xsl:apply-templates select=part mode=profile / /xsl:template And include it into the books like this: part titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude http://www.w3.org/2001/XInclude href=820_gerrit.xml / /part or appendix titleGerrit code reviews with Eclipse/title xi:include xmlns:xi=http://www.w3.org/2001/XInclude http://www.w3.org/2001/XInclude href=820_gerrit.xml / /appendix Unfortunately my customization removes not only the top level part element but the whole part. Is anyone aware of a nice trick to replace part in some books with appendix? Best regards, Lars P.S. What I would like to have is the equivalent of the merge node for defining Android layouts, this node is only their to have a valid XML file, but is removed during the include process.
Re: [docbook-apps] PDF-like HTML output
The main issue for me is that, to my knowledge, there is no open source solution that works with CSS Paged media and its associated generated content) and none of the available commercial solutions is cheap. Prince XML allows you to do development without a license but not commercial use. Whether good or bad there are several FO processors in the open source market. There is also an issue of extensions. I'm not totally against doing this for Docbook but you then have to choose how will you implement those instructions without cluttering your CSS with prefixed selectors. It's not like FO where you can code the extensions as separate packages and then use a parameter to reference the extensions. I guess you could create separate stylesheets for Antenna House, Prince XML and other CSS PM processors but then it becomes a maintainability issue. The final question I'd have before jumping into CSS Paged Media development is for what version of the stylesheets? The current version still has some ugly kludges inherited from the distant past but it's what we have. XSLT2 stylesheets have not made it to the main stylesheet distribution yet. All that said, there's nothing stopping you from porting your css stylesheets to the XSLT1 packkage and submitting them for inlusion, whether they are accepted or not I can't predict. On Fri, Aug 14, 2015 at 1:38 PM, Winslow Dalpe rwda...@gmail.com wrote: I have a little experience in this arena with my latest project. A great resource I found for things like dynamic page numbers and other features was this article http://alistapart.com/article/building-books-with-css3 In it they actually discuss the table of contents issue you mention. For reference, if you want to see what I personally have done with it so far, you can take a look at the html output at http://rwdalpe.github.io/two-graves/player-guide/ There's a link to the PDF output at the top of the page. Princexml is the tool I have been using to convert html+css into PDF. So far I have found this preferable to xsl-fo and haven't encountered a killer missing feature yet. On 8/9/15 4:45 PM, Jan Tosovsky wrote: Dear All, (1) there was lot of work in W3 recently dedicated in CSS for paged media (2) there are conversion tools from HTML+CSS to PDF utilizing these features (3) some interesting JavaScript libraries have appeared (e.g. vivliostyle.js) emulating the intended rendering to 'yet inmature' browsers (polyfills) which make me wonder if there is an interest in making some kind of reference implementation of PDF-like output in HTML+CSS from DocBook source, especially for (3). Has anybody any experience with it? There were some mumblings a while ago that this might be the direction of print output, seeing that XSL-FO doesn't have much activity anymore. So more investigation is surely welcome. I played with this a while ago, and while you can get pretty good looking print output with fairly little effort, there are some obvious functionality gaps, such as: How do you produce a table of contents with page numbers? - 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] PDF-like HTML output
Dear Carlos, thanks for your valuable feedback! On 2015-08-19 Carlos Araya wrote: The main issue for me is that, to my knowledge, there is no open source solution that works with CSS Paged media and its associated generated content) and none of the available commercial solutions is cheap. I personally take those HTML+CSS processors as temporary 'dead end' solution which will be (in long term) replaced with regular web browsers. So I was quite skeptic to CSS paged media (not mature yet, expensive processors) ... until I met vivliostyle.js. It brings CSS paged media to browsers NOW. To some extent it makes dedicated processors redundant. I don't believe all works in reality as smooth as announced on their page, but I like the concept. As it is open source, you can extend it if you find some funcionality missing. So instead of patching XSL-FO processors I'd rather patched this Javascript library (if I could). It is also temporary 'dead end' which will be replaced with regular browsers, but you can prepare the content in pure CSS standard NOW with minimal risk of further updates when browsers will become mature enough. Once your content is rendered in a browser, it is quite straight forward to convert it into PDF. But to be honest, this conversion IMHO doesn't make much sense any more ;-) All above shouldn't be taken too seriously. It is just my (naive) view. The final question I'd have before jumping into CSS Paged Media development is for what version of the stylesheets? While I'd prefer XSLT2, I am afraid this is not acceptable by majority of end users. Jan attachment: winmail.dat - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org