[docbook-apps] qandaset defaultlabel=none FOP error
Hello, I'm unable to build a PDF from a docbook 4 document that has a qandaset defaultlabel=none tag in it. If I remove the attribute, everything works fine. If I leave it in, I get the following errors: The process 'Apache FOP' ended with code: 1. The error was: ERROR - Couldn't find hyphenation pattern for lang=en. ERROR - Exception net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source) at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source) at org.apache.fop.cli.Main.startFOP(Main.java:177) at org.apache.fop.cli.Main.main(Main.java:208) Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source) at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown Source) at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208) at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405) at net.sf.saxon.event.Sender.send(Sender.java:152) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:39) ... 4 more Caused by: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175) at $Proxy5.missingChildElement(Unknown Source) at org.apache.fop.fo.flow.AbstractListItemPart.endOfNode(AbstractListItemPart.java:89) at org.apache.fop.fo.flow.ListItemLabel.endOfNode(ListItemLabel.java:48) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181) ... 21 more - net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source) at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown Source) at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208) at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405) at
Re: [docbook-apps] DoCookBook EPUB?
Hi, On Wed, 03 Apr 2013 09:16:56 +0100 Mike Cook m...@mikecook.co.uk wrote: [...] Do you have, or are you planning to release, an EPUB version of your DoCookBook? Ok, thanks for all your interest in an ebook version. Give me some time and I will release an EPUB file soon. :) -- Gruß/Regards, Thomas Schraitle - 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] Epub2 and SVG
On 04/04/13 20:28, Marcel Tromp wrote: I am curious about other people's approach to using SVG in Epub2. IIRC Epub2, the spec, doesn't mention SVG? Perhaps that is why most readers don't render well? 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] xrefs to title elements don't work
Hi Eric, On Fri, 5 Apr 2013 01:00:45 + Eric Nordlund nordl...@cray.com wrote: [... @id attributes in titles instead of parent...] Is there a way to make these work in the XSL-FO output? I was thinking I could have a template that could recognize when an xref/@linkend pointed to the id of a title and then change the linkend to the id of the title's parent element, but I don't really know how to do that. Is there another way to do what I need to do? Well, my impression was that the DocBook XSL stylesheets takes this into account, so in theory it doesn't matter if the @id was placed wrongly. Maybe I'm wrong, I haven't tested that. However, if you really care, I would target your issue from a different angle: use XSLT to move your @id attribute to its parent element. Pass the result to your DocBook stylesheets (or your customization layer). No FO customization is needed in this case. :) Here is a stylesheet that moves an @id attribute from a title element to its parent element (probably it's incomplete, but it should be easy to extent it): - xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:output method=xml indent=yes doctype-public=-//OASIS//DTD DocBook XML V4.5//EN doctype-system=http://www.docbook.org/xml/4.5/docbookx.dtd/ xsl:template match=node() | @* name=copy xsl:copy xsl:apply-templates select=@* | node()/ /xsl:copy /xsl:template xsl:template match=title/@id/ xsl:template name=copytitleid xsl:copy xsl:copy-of select=@*/ xsl:if test=(title/@id| *[contains(local-name(),'info')]/title/@id) xsl:attribute name=id xsl:value-of select=(title/@id| *[contains(local-name(),'info')]/title/@id)[1]/ /xsl:attribute /xsl:if xsl:apply-templates/ /xsl:copy /xsl:template xsl:template match=appendix|article|book| bibliography|bibliodiv| chapter|colophon| dedication|glossary| preface|part|reference| refsection|refsect1|refsect2|refsect3| set| section|sect1|sect2|sect3|sect4|sect5 xsl:call-template name=copytitleid/ /xsl:template xsl:template match=figure|example|procedure|task xsl:call-template name=copytitleid/ /xsl:template /xsl:stylesheet - -- Gruß/Regards, Thomas Schraitle - 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] xrefs to title elements don't work
It sounded like, from Nordlund's description, his sections already have IDs. So it might cause problems to replace those IDs. We'd need to know: do ALL xrefs target titles, NONE of them target actual sections? --Aaron DaMommio On Fri, Apr 5, 2013 at 1:53 AM, Thomas Schraitle tom_s...@web.de wrote: Hi Eric, On Fri, 5 Apr 2013 01:00:45 + Eric Nordlund nordl...@cray.com wrote: [... @id attributes in titles instead of parent...] Is there a way to make these work in the XSL-FO output? I was thinking I could have a template that could recognize when an xref/@linkend pointed to the id of a title and then change the linkend to the id of the title's parent element, but I don't really know how to do that. Is there another way to do what I need to do? Well, my impression was that the DocBook XSL stylesheets takes this into account, so in theory it doesn't matter if the @id was placed wrongly. Maybe I'm wrong, I haven't tested that. However, if you really care, I would target your issue from a different angle: use XSLT to move your @id attribute to its parent element. Pass the result to your DocBook stylesheets (or your customization layer). No FO customization is needed in this case. :) Here is a stylesheet that moves an @id attribute from a title element to its parent element (probably it's incomplete, but it should be easy to extent it): - xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:output method=xml indent=yes doctype-public=-//OASIS//DTD DocBook XML V4.5//EN doctype-system=http://www.docbook.org/xml/4.5/docbookx.dtd/ xsl:template match=node() | @* name=copy xsl:copy xsl:apply-templates select=@* | node()/ /xsl:copy /xsl:template xsl:template match=title/@id/ xsl:template name=copytitleid xsl:copy xsl:copy-of select=@*/ xsl:if test=(title/@id| *[contains(local-name(),'info')]/title/@id) xsl:attribute name=id xsl:value-of select=(title/@id| *[contains(local-name(),'info')]/title/@id)[1]/ /xsl:attribute /xsl:if xsl:apply-templates/ /xsl:copy /xsl:template xsl:template match=appendix|article|book| bibliography|bibliodiv| chapter|colophon| dedication|glossary| preface|part|reference| refsection|refsect1|refsect2|refsect3| set| section|sect1|sect2|sect3|sect4|sect5 xsl:call-template name=copytitleid/ /xsl:template xsl:template match=figure|example|procedure|task xsl:call-template name=copytitleid/ /xsl:template /xsl:stylesheet - -- Gruß/Regards, Thomas Schraitle - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org -- -- Aaron DaMommio: Husband, father, writer, juggler, and expert washer of dishes. - My blog: http://aarondamommio.blogspot.com - Need a juggler? http://amazingaaronjuggler.blogspot.com/ ===
[docbook-apps] [GSoC 2013] Creating interactive WebHelp output using client-side XSLT
I'm trying to implement a sample project to simulate a WebHelp using Saxon-CE according to the way mentioned in http://docbook.xmlpress.net/tiki-index.php?page=Ideas2013 So I looked into Saxon-CE documentation but the problem is with xsl style sheet. In an example it looked like this http://www.saxonica.com/ce/demos/books/books.xsl Do I need to write that kind of style sheet from the beginning or is there any pre implemented xsl files? If I should write it from the beginning I think I'm in a real trouble because I'm new to xslt 2.0. Can anyone please help me to deal with this style sheet problem? -- Regards W.Dimuthu Upeksha Undergraduate Department of Computer Science And Engineering University of Moratuwa, Sri Lanka
[docbook-apps] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Hi, I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. I've been using DocBook both for personal documents (CV, Bachelor and Master Thesis, papers, etc.) and in the FreeBSD Project. I'm usually satisfied with the output that Apache FOP creates but I believe the PDF generation should be better supported. The only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Besides, I had problems with it with large documents (it crashes). As a result, in FreeBSD, we are still using DocBook 4.2/4.5 with DSSSL stylesheets to render PDF since we are not satisfied with this situation. The lack of alternatives could mean technology/vendor lock-in, it does not work with some of our big documents and Java is a heavy dependency. I've worked with XSL FO and quite like how it works but when it comes to these factors I feel afraid of basing a serious project on XSL FO and FOP. Because of the complexity of XSL FO, it is not easy to write a renderer so this situation will probably not change in the near future. In turn, there's been LaTeX for a long time and people use it, they are familiar with and it is very well supported. Probably noone would think it is a risk basing a documentation project on LaTeX.But DocBook is more semantic and I like it much more. Also, the XHTML and EPUB generation of DocBook is of a really high quality. So I'd like to combine the advantages of DocBook and LaTeX and create stylesheets that produce LaTeX output that can be used for printable formats. I think that probably more people thinks like me and having this functionality would improve DocBook's acceptance in the industry. There are two projects, db2latex and dblatex, which provide such functionality but they do not integrate well with the existing stylesheets and dblatex also introduces a new dependency, Python. I'd like to create a new solution, that is purely XSLT-based and integrates with the existing DocBook XSL facilities (titlepage, I18N, etc.). My idea is to first create an XML serialization of TeX (TeXML or a slightly revised version of that), which actually has the same abstract syntax as TeX but is an XML document. Then I'd create actual stylesheets that transform DocBook documents into this XML TeX and then it would be transformed into real TeX in a second pass. So the first (more complex) pass would produce XML and only the second pass would output plain text. XSLT is not the best tool to produce plain text but this approach would mitigate this problem and at the same time avoid having to introduce new dependencies. This is a big project but I believe that the summer is enough to create a stable and useful stuff even if does not have the same feature-completeness as XHTML and XSL FO output formats. During the last summer I ported DocBook Slides to DocBook 5.0 and created stylesheets for XHTML and XSL FO output. I also have DocBook and XML/XSLT experiences from the documentation of FreeBSD. Do you also think it is useful? Any potential mentors? Please share your thoughts. Thanks, Gabor - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Hi Gabor, On 04/05/2013 09:09 AM, Gábor Kövesdán wrote: Hi, I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. That's great to hear. I very much share your concern for the lack of tools to transform DB to printable media, and therefore support the idea to work in that area. I do have a few questions about your suggested approach, though. There are two projects, db2latex and dblatex, which provide such functionality but they do not integrate well with the existing stylesheets and dblatex also introduces a new dependency, Python. Can you elaborate a little how you would reuse existing stylesheets in your approach ? AFAIU they are all specific to a particular output medium (e.g. HTML or FO), and so the only way to reuse them would be to process the generated FO instead of DB, no ? I'm also not concerned about Python as a dependency. It is widely available, and seems to me to be a better tool to translate XML to LaTeX than XSLT. However I'd be happy to learn otherwise. :-) Do you also think it is useful? Any potential mentors? Please share your thoughts. While I'm concerned about the scope of the project, I'd be happy to mentor you again this year. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
On Fri, April 5, 2013 2:09 pm, Gábor Kövesdán wrote: I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. I've been using DocBook both for personal documents (CV, Bachelor and Master Thesis, papers, etc.) and in the FreeBSD Project. I'm usually satisfied with the output that Apache FOP creates but I believe the PDF generation should be better supported. The only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Ouch. Besides, I had problems with it with large documents (it crashes). As a result, in FreeBSD, we are still using DocBook 4.2/4.5 with DSSSL stylesheets to render PDF since we are not satisfied with this situation. The lack of alternatives could mean technology/vendor lock-in, it does not work with some of our big documents and Java is a heavy dependency. I've worked with XSL FO and quite like how it works but when it comes to these factors I feel afraid of basing a serious project on XSL FO and FOP. Because of the complexity of XSL FO, it is not easy to write a renderer so this situation will probably not change in the near future. In turn, there's been LaTeX for a long time and people use it, they are familiar with and it is very well supported. Probably noone would think it is a risk basing a documentation project on LaTeX.But DocBook is more semantic and I like it much more. Also, the XHTML and EPUB generation of DocBook is of a really high quality. So I'd like to combine the advantages of DocBook and LaTeX and create stylesheets that produce LaTeX output that can be used for printable formats. I think that probably more people thinks like me and having this functionality would improve DocBook's acceptance in the industry. Have you looked at speedata Publisher (http://speedata.github.com/publisher/), which is open source, works with XML, and has LuaTeX underneath? (I haven't used it myself.) Regards, Tony Graham tgra...@mentea.net Consultant http://www.mentea.net Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- XML, XSL-FO and XSLT consulting, training and programming - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Em 05-04-2013 15:26, Stefan Seefeld escreveu: There are two projects, db2latex and dblatex, which provide such functionality but they do not integrate well with the existing stylesheets and dblatex also introduces a new dependency, Python. Can you elaborate a little how you would reuse existing stylesheets in your approach ? AFAIU they are all specific to a particular output medium (e.g. HTML or FO), and so the only way to reuse them would be to process the generated FO instead of DB, no ? I'm also not concerned about Python as a dependency. It is widely available, and seems to me to be a better tool to translate XML to LaTeX than XSLT. However I'd be happy to learn otherwise.:-) There are couple of general templates and facilities, e.g. those that handle localized text and the titlepage generation mechanism. I mean here integration and not strict reuse. People would be able to use these stylesheets with the same conventions as they use XHTML and FO stylesheets, that is, generating a titlepage, setting XSLT parameters to control behavior and overriding certain templates, in which they can insert localized templates or use e.g. the object.id template. It could be shipped with the DocBook XSL distribution and could have a similar reference documentation of XSLT parameters? If you prefer Python, it could be an alternative but I'd like to provide a purely XSLT-based mechanism, as well. According to my estimation, it would require very minimal coding. Do you also think it is useful? Any potential mentors? Please share your thoughts. While I'm concerned about the scope of the project, I'd be happy to mentor you again this year. Thank you, Stefan! Gabor - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Em 05-04-2013 16:00, Tony Graham escreveu: On Fri, April 5, 2013 2:09 pm, Gábor Kövesdán wrote: I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. I've been using DocBook both for personal documents (CV, Bachelor and Master Thesis, papers, etc.) and in the FreeBSD Project. I'm usually satisfied with the output that Apache FOP creates but I believe the PDF generation should be better supported. The only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Ouch. What do you exactly mean here? If you don't agree with this statement, could you please elaborate? Have you looked at speedata Publisher (http://speedata.github.com/publisher/), which is open source, works with XML, and has LuaTeX underneath? (I haven't used it myself.) Not yet but thank you for the hint, I'll take a look. But it also seems to have quite some dependencies (Ruby, Rake, Jekyll, Go) and it won't be able to integrate into DocBook XSL as much. Gabor - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
On 04/05/2013 10:38 AM, Gábor Kövesdán wrote: Em 05-04-2013 15:26, Stefan Seefeld escreveu: There are two projects, db2latex and dblatex, which provide such functionality but they do not integrate well with the existing stylesheets and dblatex also introduces a new dependency, Python. Can you elaborate a little how you would reuse existing stylesheets in your approach ? AFAIU they are all specific to a particular output medium (e.g. HTML or FO), and so the only way to reuse them would be to process the generated FO instead of DB, no ? I'm also not concerned about Python as a dependency. It is widely available, and seems to me to be a better tool to translate XML to LaTeX than XSLT. However I'd be happy to learn otherwise.:-) There are couple of general templates and facilities, e.g. those that handle localized text and the titlepage generation mechanism. I mean here integration and not strict reuse. People would be able to use these stylesheets with the same conventions as they use XHTML and FO stylesheets, that is, generating a titlepage, setting XSLT parameters to control behavior and overriding certain templates, in which they can insert localized templates or use e.g. the object.id template. It could be shipped with the DocBook XSL distribution and could have a similar reference documentation of XSLT parameters? OK, that makes sense. If you prefer Python, it could be an alternative but I'd like to provide a purely XSLT-based mechanism, as well. According to my estimation, it would require very minimal coding. Fair enough. Stefan -- ...ich hab' noch einen Koffer in Berlin... - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
On Fri, April 5, 2013 3:46 pm, Gábor Kövesdán wrote: Em 05-04-2013 16:00, Tony Graham escreveu: On Fri, April 5, 2013 2:09 pm, Gábor Kövesdán wrote: I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. I've been using DocBook both for personal documents (CV, Bachelor and Master Thesis, papers, etc.) and in the FreeBSD Project. I'm usually satisfied with the output that Apache FOP creates but I believe the PDF generation should be better supported. The only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Ouch. What do you exactly mean here? If you don't agree with this statement, could you please elaborate? I am the author of xmlroff. I would like it if it was more developed, that I had more time to work on it, and that there were more than me working on it, but it isn't, I don't, and there isn't, so I'm not contesting your statement. Have you looked at speedata Publisher (http://speedata.github.com/publisher/), which is open source, works with XML, and has LuaTeX underneath? (I haven't used it myself.) Not yet but thank you for the hint, I'll take a look. But it also seems to have quite some dependencies (Ruby, Rake, Jekyll, Go) and it won't be That's to build it. You can download pre-made binaries for multiple platforms. able to integrate into DocBook XSL as much. Regards, Tony Graham tgra...@mentea.net Consultant http://www.mentea.net Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- XML, XSL-FO and XSLT consulting, training and programming - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Em 05-04-2013 17:02, Tony Graham escreveu: On Fri, April 5, 2013 3:46 pm, Gábor Kövesdán wrote: Em 05-04-2013 16:00, Tony Graham escreveu: On Fri, April 5, 2013 2:09 pm, Gábor Kövesdán wrote: I plan to apply to this year's Summer of Code and I wanted to share my idea with you for discussion. I've been using DocBook both for personal documents (CV, Bachelor and Master Thesis, papers, etc.) and in the FreeBSD Project. I'm usually satisfied with the output that Apache FOP creates but I believe the PDF generation should be better supported. The only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Ouch. What do you exactly mean here? If you don't agree with this statement, could you please elaborate? I am the author of xmlroff. I would like it if it was more developed, that I had more time to work on it, and that there were more than me working on it, but it isn't, I don't, and there isn't, so I'm not contesting your statement. Ok, I didn't know you were the author. I didn't mean it as a malicious criticism, so I apologise if you felt like that. I would also loved if there were other implementations of XSL FO and I especially like to initiative of xmlroff because it is written in C. A good C (or other native) implementation is also what the FreeBSD Project would desire but we tried it out and the current output is not good enough yet. Indeed, it would be really awesome if more people got involved in it but I think implementing an XSL FO renderer is not quite a trivial task. Anyway, haven't you thought of applying to GSoC with xmlroff as a mentoring organization? Probably you would have to describe some well-defined project ideas and probably it is too late for this summer and it may be worth a try for the next year. Gabor - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
On Fri, April 5, 2013 4:20 pm, Gábor Kövesdán wrote: Em 05-04-2013 17:02, Tony Graham escreveu: On Fri, April 5, 2013 3:46 pm, Gábor Kövesdán wrote: Em 05-04-2013 16:00, Tony Graham escreveu: On Fri, April 5, 2013 2:09 pm, Gábor Kövesdán wrote: ... only usable open source XSL FO renderer is Apache FOP (xmlroff is very immature and is not actively developed) so we have no alternatives. Ouch. What do you exactly mean here? If you don't agree with this statement, could you please elaborate? I am the author of xmlroff. I would like it if it was more developed, that I had more time to work on it, and that there were more than me working on it, but it isn't, I don't, and there isn't, so I'm not contesting your statement. Ok, I didn't know you were the author. I didn't mean it as a malicious criticism, so I apologise if you felt like that. I would also loved if I felt it was an honest assessment and was not at all malicious. there were other implementations of XSL FO and I especially like to initiative of xmlroff because it is written in C. A good C (or other native) implementation is also what the FreeBSD Project would desire but we tried it out and the current output is not good enough yet. Indeed, it would be really awesome if more people got involved in it but I think implementing an XSL FO renderer is not quite a trivial task. Anyway, haven't you thought of applying to GSoC with xmlroff as a mentoring organization? Probably you would have to describe some well-defined project ideas and probably it is too late for this summer and it may be worth a try for the next year. I tried several years ago and didn't make the cut. The same lack of activity that you observe would count against it as a GSoC project at present. My current major activity w.r.t. formatting XML is the Print and Page Layout Community Group at the W3C (http://www.w3.org/community/ppl/), which is a place for anybody interested in XSL-FO or in any other technology for making pages from XML. Regards, Tony Graham tgra...@mentea.net Consultant http://www.mentea.net Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- XML, XSL-FO and XSLT consulting, training and programming - 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] xrefs to title elements don't work
Hi Eric, Actually, creating an xref to a title used to work in the stylesheets. Currently it gets the generated text right, but the link is to the id of the title element, and most title elements do not output an @id attribute, so the link fails. It seems this feature was broken some time ago when the xref templates were rewritten to support universal linking in DocBook 5. This customization of the template named 'simple.xlink' from fo/inline.xsl fixes the id problem. It only corrects the problem for @linkend references, not for @xlink:href references used in universal linking, but it should suffice for your needs. Search for 'linkend.candidate' to see where I made the changes. xsl:template name=simple.xlink xsl:param name=node select=./ xsl:param name=content xsl:apply-templates/ /xsl:param xsl:param name=linkend.candidate select=$node/@linkend/ xsl:param name=xhref select=$node/@xlink:href/ xsl:choose xsl:when test=$xhref and (not($node/@xlink:type) or $node/@xlink:type='simple') !-- Is it a local idref? -- xsl:variable name=is.idref xsl:choose !-- if the href starts with # and does not contain an ( -- !-- or if the href starts with #xpointer(id(, it's just an ID -- xsl:when test=starts-with($xhref,'#') and (not(contains($xhref,'#40;')) or starts-with($xhref, '#xpointer#40;id#40;'))1/xsl:when xsl:otherwise0/xsl:otherwise /xsl:choose /xsl:variable !-- Is it an olink ? -- xsl:variable name=is.olink xsl:choose !-- If xlink:role=http://docbook.org/xlink/role/olink; -- !-- and if the href contains # -- xsl:when test=contains($xhref,'#') and @xlink:role = $xolink.role1/xsl:when xsl:otherwise0/xsl:otherwise /xsl:choose /xsl:variable xsl:choose xsl:when test=$is.olink = 1 xsl:call-template name=olink xsl:with-param name=content select=$content/ /xsl:call-template /xsl:when xsl:when test=$is.idref = 1 xsl:variable name=idref xsl:call-template name=xpointer.idref xsl:with-param name=xpointer select=$xhref/ /xsl:call-template /xsl:variable xsl:variable name=targets select=key('id',$idref)/ xsl:variable name=target select=$targets[1]/ xsl:call-template name=check.id.unique xsl:with-param name=linkend select=$idref/ /xsl:call-template xsl:choose xsl:when test=count($target) = 0 xsl:message xsl:textXLink to nonexistent id: /xsl:text xsl:value-of select=$idref/ /xsl:message xsl:copy-of select=$content/ /xsl:when xsl:otherwise fo:basic-link internal-destination={$idref} xsl:apply-templates select=. mode=simple.xlink.properties/ xsl:copy-of select=$content/ /fo:basic-link /xsl:otherwise /xsl:choose /xsl:when !-- otherwise it's a URI -- xsl:otherwise fo:basic-link external-destination=url({$xhref}) xsl:apply-templates select=. mode=simple.xlink.properties/ xsl:copy-of select=$content/ /fo:basic-link !-- * Call the template for determining whether the URL for this -- !-- * hyperlink is displayed, and how to display it (either inline or -- !-- * as a numbered footnote). -- xsl:call-template name=hyperlink.url.display xsl:with-param name=url select=$xhref/ /xsl:call-template /xsl:otherwise /xsl:choose /xsl:when xsl:when test=$linkend.candidate xsl:variable name=targets.candidate select=key('id',$linkend.candidate)/ xsl:variable name=target.candidate select=$targets.candidate[1]/ xsl:variable name=target.id xsl:choose xsl:when test=$target.candidate/self::title and $target.candidate/parent::*/@id xsl:value-of select=$target.candidate/parent::*/@id/ /xsl:when xsl:otherwise xsl:value-of select=$target.candidate/@id/ /xsl:otherwise /xsl:choose /xsl:variable xsl:variable name=targets select=key('id',$target.id)/ xsl:variable name=target select=$targets[1]/ xsl:variable name=linkend select=$target/@id/ xsl:call-template name=check.id.unique xsl:with-param name=linkend select=$linkend/ /xsl:call-template xsl:choose xsl:when test=count($target) = 0 xsl:message xsl:textXLink to nonexistent id: /xsl:text xsl:value-of select=$linkend/ /xsl:message
RE: [docbook-apps] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Please share your thoughts. I entered company that used dblatex. My task was to create outputs that meet the corporate identity. I very quickly switched to XSL-FO and commercial XSL-FO processor. I still believe this was the only solution to cope with that. If you need huge customizations in TeX based solutions, you need deep knowledge both XSLT and TeX parts of the production workflow as you usually have to customize both of them. Knowing nothing about TeX syntax I simplified my task by concentrating on one well known syntax - XSL-FO (i.e. standard with bright future :). 5 yrs ago I hoped that FOP is almost mature product. Unfortunately I still cannot say that. It's a pity. Seeing huge investments in many areas it is a shame that FOP is still on the perifery of the interest. I promise when I earn money I'll suport its development. It deserves it. To be a programmer, instead of creating proposed 'workaround' for FOP issues I'd rather fix them ;-) Jan - 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] qandaset defaultlabel=none FOP error
Hi Eric, Indeed, this is a bug in the template with match=question in fo/qandaset.xsl. I've fixed it in SVN for the next release, and you can use this version in your customization layer: xsl:template match=question xsl:variable name=idxsl:call-template name=object.id//xsl:variable xsl:variable name=entry.id xsl:call-template name=object.id xsl:with-param name=object select=parent::*/ /xsl:call-template /xsl:variable xsl:variable name=deflabel xsl:apply-templates select=. mode=qanda.defaultlabel/ /xsl:variable xsl:variable name=label.content xsl:apply-templates select=. mode=label.markup/ xsl:if test=contains($deflabel, 'number') and not(label) xsl:apply-templates select=. mode=intralabel.punctuation/ /xsl:if /xsl:variable fo:list-item id={$entry.id} xsl:use-attribute-sets=list.item.spacing fo:list-item-label id={$id} end-indent=label-end() xsl:choose xsl:when test=string-length($label.content) gt; 0 fo:block font-weight=bold xsl:copy-of select=$label.content/ /fo:block /xsl:when xsl:otherwise fo:block/ /xsl:otherwise /xsl:choose /fo:list-item-label fo:list-item-body start-indent=body-start() xsl:choose xsl:when test=$deflabel = 'none' and not(label) fo:block font-weight=bold xsl:apply-templates select=*[local-name(.)!='label']/ /fo:block /xsl:when xsl:otherwise xsl:apply-templates select=*[local-name(.)!='label']/ /xsl:otherwise /xsl:choose !-- Uncomment this line to get revhistory output in the question -- !-- xsl:apply-templates select=preceding-sibling::revhistory/ -- /fo:list-item-body /fo:list-item /xsl:template Bob Stayton Sagehill Enterprises b...@sagehill.net From: Eric Nordlund Sent: Thursday, April 04, 2013 11:05 PM To: docbook-apps@lists.oasis-open.org Subject: [docbook-apps] qandaset defaultlabel=none FOP error Hello, I'm unable to build a PDF from a docbook 4 document that has a qandaset defaultlabel=none tag in it. If I remove the attribute, everything works fine. If I leave it in, I get the following errors: The process 'Apache FOP' ended with code: 1. The error was: ERROR - Couldn't find hyphenation pattern for lang=en. ERROR - Exception net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source) at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source) at org.apache.fop.cli.Main.startFOP(Main.java:177) at org.apache.fop.cli.Main.main(Main.java:208) Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source) at net.sf.saxon.event.ContentHandlerProxy.endElement(Unknown Source) at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:208) at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:425) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405) at net.sf.saxon.event.Sender.send(Sender.java:152) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:39) ... 4 more Caused by: org.apache.fop.fo.ValidationException: fo:list-item-label is missing child elements. Required content model: marker* (%block;)+ (See position 65:-1) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at
Re: [docbook-apps] Epub2 and SVG
SVG is part of epub 2.0: http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm#Section2.5.1 MT -- On Thu, Apr 4, 2013 at 11:36 PM, davep da...@dpawson.co.uk wrote: On 04/04/13 20:28, Marcel Tromp wrote: I am curious about other people's approach to using SVG in Epub2. IIRC Epub2, the spec, doesn't mention SVG? Perhaps that is why most readers don't render well? regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk --**--**- To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.orgdocbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-**open.orgdocbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Epub2 and SVG
I've not read Epub3 best practices yet: I was planning to stick with Epub2 for the time being because of a lack of 3.0 readers. I will try Epub3, but I expect similar results: when I use Streamium (an Epub3 capable reader) to render my Epub2, the svg is rendered incorrectly as well. Fall back will not work because the readers render the SVG, they just doo a very poor job of it. MT -- On Fri, Apr 5, 2013 at 6:16 AM, Mike Cook m...@mikecook.co.uk wrote: On 04/04/2013 20:28, Marcel Tromp wrote: I am curious about other people's approach to using SVG in Epub2. However, all the epub readers we have tried do a horrible job of rendering SVG. We have tried Nook for Android, Aldiko, Mantano, EZpdf, and Readium. Azardi is the only one that produces usable rendering. Is the best option to convert to png and use that? That would be a shame. From the EPUB 3 Best Practices book[1]; EPUB 3 maintains compatibility with EPUB 2 through its continued use of SVG 1.1... Can you implement a fallback? object data=image01.svg type=image/svg+xml width=640 height=480 img src=image01.png alt=... / /object Using an object tag also allows you to embed a fallback image for those reading systems that don’t support SVG I've only just started looking into the DocBook XSL this last week but apparently O'Reilly made some useful additions to the EPUB3 stylesheets[2], making them fully EPUB2 compatible. You should also read EPUB Best Practices as you'll find a lot of useful information in it. Mike [1] http://shop.oreilly.com/**product/0636920024897.dohttp://shop.oreilly.com/product/0636920024897.do [2] http://toc.oreilly.com/2013/**02/oreillys-journey-to-epub-3.**htmlhttp://toc.oreilly.com/2013/02/oreillys-journey-to-epub-3.html --**--**- To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.orgdocbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-**open.orgdocbook-apps-h...@lists.oasis-open.org
RE: [docbook-apps] GSoC Project Idea: integrated LaTeX output support for the stylesheets
On 2013-04-05 12:19, honyk wrote: I entered company that used dblatex. My task was to create outputs that meet the corporate identity. I very quickly switched to XSL-FO and commercial XSL-FO processor. I still believe this was the only solution to cope with that. If you need huge customizations in TeX based solutions, you need deep knowledge both XSLT and TeX parts of the production workflow as you usually have to customize both of them. FWIW, we've used the dblatex solution for five years now, and are very pleased with it. We chose it, rather than the XSL-FO route, because we're producing grammars of languages that have mixed left-to-right and right-to-left text, and not just garden variety Arabic script). At the time we made this choice, I don't believe XSL-FO supported right-to-left text well. Of course, that probably matters not at all in your situation! (BTW, we're actually using XeLaTeX, a Unicode-aware version of LaTeX.) One obvious disadvantage is that we've needed to understand LaTeX (not plain TeX), since many of the tweaks rely on changes to our LaTeX style sheets, or alternative LaTeX packages. But this has been an advantage at the same time, since the LaTeX typesetting is quite mature and has handled everything we've thrown at it. Someone mentioned that dblatex uses Python. The amount of Python code in dblatex is quite small, and I've never had to do anything with it. The xslt code, otoh, I've had to deal with extensively, although most of that has had to do with odd things we're doing with the alignment of right-to-left text, and some linguistic data structures we've added to the standard DocBook structures. Mike Maxwell University of Maryland - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Em 05-04-2013 18:19, honyk escreveu: If you need huge customizations in TeX based solutions, you need deep knowledge both XSLT and TeX parts of the production workflow as you usually have to customize both of them. That is exactly true about XSL FO as well. If you need customizations, you need to know both XSLT and XSL FO. It is just a question of which one you know better, XSL FO or TeX. I've worked with both and I have no problem with either, using a reference I can find out what I want to know. But I think there are more people, who knows TeX than XSL FO. Knowing nothing about TeX syntax I simplified my task by concentrating on one well known syntax - XSL-FO (i.e. standard with bright future:). Let's hope that bright future! But the 5 years you have waited hoping that things are getting better are not a good reason to be so optimistic. 5 yrs ago I hoped that FOP is almost mature product. Unfortunately I still cannot say that. It's a pity. Seeing huge investments in many areas it is a shame that FOP is still on the perifery of the interest. I promise when I earn money I'll suport its development. It deserves it. To be a programmer, instead of creating proposed 'workaround' for FOP issues I'd rather fix them;-) I'm not saying it should not be fixed but probably I'm not the best person for that since I don't have such a deep knowledge on typesetting. Besides, it is much more about providing an alternative choice, another flavor of rendering printable output from DocBook. You didn't want to learn TeX and better switched to commercial XSL FO product. In the same way, there may be people who do not want to learn XSL FO but know TeX and would be interested in using DocBook over a TeX-based solution. Gabor - 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] GSoC Project Idea: integrated LaTeX output support for the stylesheets
Em 05-04-2013 22:16, maxwell escreveu: One obvious disadvantage is that we've needed to understand LaTeX (not plain TeX), since many of the tweaks rely on changes to our LaTeX style sheets, or alternative LaTeX packages. But this has been an advantage at the same time, since the LaTeX typesetting is quite mature and has handled everything we've thrown at it. Someone mentioned that dblatex uses Python. The amount of Python code in dblatex is quite small, and I've never had to do anything with it. The xslt code, otoh, I've had to deal with extensively, although most of that has had to do with odd things we're doing with the alignment of right-to-left text, and some linguistic data structures we've added to the standard DocBook structures. Having this solution, would you still be interested in a more integrated solution that follows the conventions of the DocBook XSL stylesheets and allows tuning with parameters and easy customization? Are there any serious problems in dblatex that aren't solved for you? Any functionality that you preferred to be implemented in a different way? Gabor - 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] Specify FO output font size in xml element?
Hi gang, I've had so much luck with this list this week. Thanks! I have some verbatim sections that I need to shrink the font size so the whole line fits on the page. I've modified the xsl:template match=programlisting|screen|synopsis template in verbatim.xsl so that I can pass a width='1' attribute which sets the resulting fo:block to have 0pts indent left and right, which effectively opens my margins up. Another thing I need to do is pass a role=8pt or role=7pt attribute that will shrink the font size down on those elements for the really long ones. Is that something anyone has done before that could share a sample with me? Am I even on the right track, or am I making things harder than they need to be? Thanks in advance! Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232 - 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] Specify FO output font size in xml element?
Hi Eric, Take a look at the monospace.verbatim.properties attribute set. I know you can set the font there. You may also be able to adjust the margins (I haven't tried that in this context). Generally, I always look for attribute sets first when doing a customization, because if you can get what you need done with the attribute set, it will save you having to customize templates. Best Regards, Dick Hamilton --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 5, 2013, at 5:35 PM, Eric Nordlund wrote: Hi gang, I've had so much luck with this list this week. Thanks! I have some verbatim sections that I need to shrink the font size so the whole line fits on the page. I've modified the xsl:template match=programlisting|screen|synopsis template in verbatim.xsl so that I can pass a width='1' attribute which sets the resulting fo:block to have 0pts indent left and right, which effectively opens my margins up. Another thing I need to do is pass a role=8pt or role=7pt attribute that will shrink the font size down on those elements for the really long ones. Is that something anyone has done before that could share a sample with me? Am I even on the right track, or am I making things harder than they need to be? Thanks in advance! Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232 - 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] Specify FO output font size in xml element?
Thanks Richard. I have used the attribute sets for the entire document, but some of my examples are too long to fit on the page and I want to shrink the font size for only that instance so I can fit it without compromising the rest of the verbatim blocks. In other words, I only want to apply these fine-grained customizations on demand for individual instances, and not the entire document. The reason I want to use the role=7pt and width=0 is because our entire document set uses these attributes for that purpose with our FOSI publishing system. I'm trying to port our current system to XSL-FO to make it more future-proof. Eric -Original Message- From: Richard Hamilton [mailto:hamil...@xmlpress.net] Sent: Friday, April 05, 2013 5:52 PM To: Eric Nordlund Cc: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Specify FO output font size in xml element? Hi Eric, Take a look at the monospace.verbatim.properties attribute set. I know you can set the font there. You may also be able to adjust the margins (I haven't tried that in this context). Generally, I always look for attribute sets first when doing a customization, because if you can get what you need done with the attribute set, it will save you having to customize templates. Best Regards, Dick Hamilton --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 5, 2013, at 5:35 PM, Eric Nordlund wrote: Hi gang, I've had so much luck with this list this week. Thanks! I have some verbatim sections that I need to shrink the font size so the whole line fits on the page. I've modified the xsl:template match=programlisting|screen|synopsis template in verbatim.xsl so that I can pass a width='1' attribute which sets the resulting fo:block to have 0pts indent left and right, which effectively opens my margins up. Another thing I need to do is pass a role=8pt or role=7pt attribute that will shrink the font size down on those elements for the really long ones. Is that something anyone has done before that could share a sample with me? Am I even on the right track, or am I making things harder than they need to be? Thanks in advance! Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232 - 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] Specify FO output font size in xml element?
On 04/05/2013 08:57 PM, Eric Nordlund wrote: Thanks Richard. I have used the attribute sets for the entire document, but some of my examples are too long to fit on the page and I want to shrink the font size for only that instance so I can fit it without compromising the rest of the verbatim blocks. For such cases I have been using the role attribute: * Use something like verbatim role=extra.small.text.../verbatim * Define a template like xsl:template match=verbatim[@role='extra.small.text'] and reduce the font size to your hear's content (for example by adding xsl:attribute name=font-size70%/xsl:attribute to your putput). Hope that helps, Stefan -- ...ich hab' noch einen Koffer in Berlin... - 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] Specify FO output font size in xml element?
I see, that's a somewhat different situation. One strategy, though it will take a bit more customization, would be to use the strategy used in the standard stylesheets for the table.cell.properties template. This is a template that defines an attribute set (when called appropriately). Because it's a template, it can return different values depending on context, whereas an attribute set is fixed. There are probably other strategies that will work, too, but this may be worth exploring. Best Regards, Dick --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 5, 2013, at 5:57 PM, Eric Nordlund wrote: Thanks Richard. I have used the attribute sets for the entire document, but some of my examples are too long to fit on the page and I want to shrink the font size for only that instance so I can fit it without compromising the rest of the verbatim blocks. In other words, I only want to apply these fine-grained customizations on demand for individual instances, and not the entire document. The reason I want to use the role=7pt and width=0 is because our entire document set uses these attributes for that purpose with our FOSI publishing system. I'm trying to port our current system to XSL-FO to make it more future-proof. Eric -Original Message- From: Richard Hamilton [mailto:hamil...@xmlpress.net] Sent: Friday, April 05, 2013 5:52 PM To: Eric Nordlund Cc: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Specify FO output font size in xml element? Hi Eric, Take a look at the monospace.verbatim.properties attribute set. I know you can set the font there. You may also be able to adjust the margins (I haven't tried that in this context). Generally, I always look for attribute sets first when doing a customization, because if you can get what you need done with the attribute set, it will save you having to customize templates. Best Regards, Dick Hamilton --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 5, 2013, at 5:35 PM, Eric Nordlund wrote: Hi gang, I've had so much luck with this list this week. Thanks! I have some verbatim sections that I need to shrink the font size so the whole line fits on the page. I've modified the xsl:template match=programlisting|screen|synopsis template in verbatim.xsl so that I can pass a width='1' attribute which sets the resulting fo:block to have 0pts indent left and right, which effectively opens my margins up. Another thing I need to do is pass a role=8pt or role=7pt attribute that will shrink the font size down on those elements for the really long ones. Is that something anyone has done before that could share a sample with me? Am I even on the right track, or am I making things harder than they need to be? Thanks in advance! Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232 - 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] Specify FO output font size in xml element?
That may be a quicker, easier way to do this. Certainly worth trying before you try my suggestion from a few minutes ago:-). Dick --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 5, 2013, at 6:06 PM, Stefan Seefeld wrote: On 04/05/2013 08:57 PM, Eric Nordlund wrote: Thanks Richard. I have used the attribute sets for the entire document, but some of my examples are too long to fit on the page and I want to shrink the font size for only that instance so I can fit it without compromising the rest of the verbatim blocks. For such cases I have been using the role attribute: * Use something like verbatim role=extra.small.text.../verbatim * Define a template like xsl:template match=verbatim[@role='extra.small.text'] and reduce the font size to your hear's content (for example by adding xsl:attribute name=font-size70%/xsl:attribute to your putput). Hope that helps, Stefan -- ...ich hab' noch einen Koffer in Berlin... - 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] participating GSOC 2013
Hi all, I'm Kelum Deshapriya.i'm new to gsoc. I'm willing to participate gsoc 2013 and work with Docbook XSLT 2.0 stylesheets project. I haven't previous experience about project. so i did some searching to learn Docbook. http://en.wikipedia.org/wiki/DocBook http://www.sagehill.net/docbookxsl/index.html https://help.ubuntu.com/community/DocBook i'm interesting working with Docbook XSLT 2.0 Stylesheets project. but i don't know how to start working this project. so can anyone give me some help to start working with this project? thanks. -- Regards G.G.Kelum Deshapriya Undergraduate Dept of Computer Science And Engineering University of Moratuwa SriLanka