Re: [docbook-apps] info problems
On 2/5/2012 2:27 AM, Richard Hamilton wrote: The limitation is that you can't have a title both insideinfo and directly under the same element, so the following is invalid: book title.../title infotitle.../title/info ... /book This, however is valid: book infotitle.../title/info ... chapter title.../title infoother info stuff/info ... /chapter /book Are you saying that XMLmind complains about the second case above? Yes, that's what it's doing--it's complaining about the second case above, and singling out the info element. Now that I think about it, I guess if the problem had been what I thought (the second structure above was invalid), it would have complained about the title elements in the chapters instead, assuming it parses top-down. That eliminates one explanation; I'll look into others. Thanks! -- Mike Maxwell maxw...@umiacs.umd.edu My definition of an interesting universe is one that has the capacity to study itself. --Stephen Eastmond - 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] PDF Cutomization
Hello folks, Many times ago I tried to add variables text in my genereted PDF. I found simple workaroud: use --stringparam with xsltproc and -param with XEP (which is the one I use). So I call xep like that: xep -xsl myStylesheet.xsl -xml myFile.xml -param buyer.name=John Doe -pdf /tmp/dummy.pdf Inside myStyleSheet.xsl I defined a default value for buyer.name xsl:variable name=buyer.name select=nobody nobody/ And i use it in a template xsl:template name=generated.for fo:block xsl:textThis PDF was generated for /xsl:text xsl:value-fo select=$buyer.name/ /fo:block /xsl:template It had worked. But since I updated XEP to 4.19, It does not work anymore, every time I found nobody nobody instead of John Doe. Is any one could help me? Regards, 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] Upgrading from DocBook 4.5
Hi Jeff, My book has a little bit of information on getting started with DocBook5: http://docs.oasis-open.org/docbook/rng/5.0/ The DocBook 5 schemas can be located starting at docbook.org under the Schemas tab. That links to the OASIS site with the RNG schemas. Regarding the stylesheets, yes, that is the correct url on SourceForge. For validation, you can start with: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation Several XML editors also validate RelaxNG, including Oxygen and XMLMInd among others. Gotchas? The main one is to remember to add the namespace prefix to all element names in your stylesheet customization. Until you get in the habit of doing that, it is probably the most frequent error, and it does not generate an error message (it just doesn't work). As was stated earlier, 5.1 is still under development, and so can change before being finalized. If you want stability, go with 5.0. But 5.1 has the assembly stuff, which is the new way of building documents from modular files. That's bleeding edge, though. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Jeff Powanda To: docbook-apps@lists.oasis-open.org Sent: Friday, February 03, 2012 11:17 AM Subject: [docbook-apps] Upgrading from DocBook 4.5 I'm considering upgrading my DocBook 4.5 toolchain and had some basic question before I start: - Where's the best guide on how to convert DocBook 4.5 XML files to DocBook 5.x? Is the Transition Guide (http://www.docbook.org/docs/howto/) the best place to start? Are there other guides? - Where should I go to download the RelaxNG schema? - Where should I go to download the latest DocBook XSL stylesheets for DocBook 5.x? Should I go here: http://sourceforge.net/projects/docbook/files/docbook-xsl-ns/ - What tools for validation are there available for DocBook 5.x? - Are there any gotchas I should be aware of? - Is there any reason I shouldn't move to DocBook 5.1 (rather than DocBook 5.0)? Regards, Jeff Powanda Vocera Communications, Inc.
Re: [docbook-apps] 'endterm' with olinks?
Hi, In the general case, a para is not a suitable target for a cross reference that generates text. It has no title, and it can contain block elements. Imagine an xref in the middle of a para inserting an orderedlist or table as the hot text, and you can see what confusion that might create. So by default, the stylesheet does not take the text of the para as the generated text, but instead uses the title of the section containing the para. This feature is handled by a template with mode=xref-to, which is used to generate the hot text that is used for both xref and olink. In fo/xref.xsl, you will find the template that handles that feature starts with: xsl:template match=para|phrase|simpara|anchor|quote mode=xref-to I would suggest that you add a new template to your customization layer for your case, but add a role attribute to the para to specialize it. Something like this (untested): xsl:template match=para[@role = 'endterm'] mode=xref-to xsl:apply-templates/ /xsl:template Then add a role=endterm to your para and see if that works without the xreflabel. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Giuseppe Monticelli mo...@funambol.com To: Bob Stayton b...@sagehill.net Cc: docbook-apps@lists.oasis-open.org Sent: Sunday, February 05, 2012 12:02 PM Subject: Re: [docbook-apps] 'endterm' with olinks? Hi Bob, thank you for your answer. I decided to pay the price of simplicity, and I'm applying your Approach 2. It works, but the only issue I'm facing (though it can be limited with a workaround, see below) is that the generated hot text that should come from the element identified by 'logout' ('otherid' in your example) is actually the title of the outer 'simplesect' containing the element: (REFERENCED document) [1] ... sect2 xml:id=sect-logout titleLogout/title paraLog out from the system/para bridgeheadSecurity realm: public/bridgehead simplesect titleDefinition/title para xml:id=logoutGET /api/login?action=logout/para /simplesect ... (REFERENCING document) [2] ... row entryliteralolink targetdoc=developers-guide targetptr=sect-logout olink targetdoc=developers-guide targetptr=logout role=endterm//olink/literal/entry ... /row ... (RESULT) [3] The generated hot text is then 'the section called “Definition”' instead of 'GET /api/login?action=logout' The issue can be worked around by adding an 'xreflabel' to [1], containing the same text as the element 'para' (which is very bad duplication, indeed): (WORKAROUND) [4] simplesect titleDefinition/title para xreflabel=GET /api/login?action=logout xml:id=logoutGET /api/login?action=logout/para /simplesect ... Maybe I'm overlooking something trivial. Thank you, Giuseppe On Thu, Feb 2, 2012 at 7:42 PM, Bob Stayton b...@sagehill.net wrote: This is not a feature that is currently supported, so something original is called for here. I can think of two approaches, the former more complex but more complete than the latter. ... Approach 2. Create a nested olink with a role attribute, and customize its behavior. When an olink element is processed, if the olink element is not empty, then the stylesheet just does xsl:apply-templates/ to that content and does not look up the text in the olink database. So you could do this: olink targetptr=chapteridolink targetptr=otherid role=endterm//olink In order to not create a nested link, you would need to add a template like this to your customization: xsl:template match=olink[@role = 'endterm'] xsl:variable name=content xsl:apply-imports/ /xsl:variable xsl:value-of select=string($content)/ /xsl:template You would also want to set this param so the role attribute is not interpreted as an xrefstyle, which would generate warning messages. xsl:param name=use.role.as.xrefstyle select=0/ This template matches the nested olink because of the role value. It then processes that olink with xsl:apply-imports, which would generate a normal active link to the otherid element, with text generated from the olink database for otherid. Then it takes the string value of the result. The outer olink supplies the linking wrapper for that text. With this approach, when you take the string value of the inner olink, you lose any inline formatting, but that's the price of simplicity. 8^) Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Giuseppe Monticelli To: docbook-apps@lists.oasis-open.org Sent: Wednesday, February 01, 2012 3:06 PM Subject: [docbook-apps] 'endterm' with olinks? Is there a possibility to emulate with 'olink' the behavior of the attributes 'linkend' and 'endterm' used together in the 'xref' element? I would like that a couple of my olinks (necessarily used instead of 'xref' in modular documents with XInclude) receive a dedicated cross reference text coming from a particular element, while the cross reference
Re: [docbook-apps] Content Management solutions that support DocBook 5.x?
I have very little exposure to it, but SilverStripe (http://www.silverstripe.com/) might merit some investigation. On 2/5/2012 2:34 PM, Jeff Powanda wrote: There are three main reasons I'm interested in adopting a CM solution: 1. Our small technical publications department has started to translate 20+ manuals, 3 Eclipse help systems, and several HTML documents into non-English languages (such as French) and I'm finding it difficult to manage all the content for handoffs. This year the number of languages we'll be translating will potentially triple, so I would like to be able to generate reports on where the linked content, entities files, graphics files, and graphics source files reside for each document, and also keep track of files that have been handed off to the translation agencies. (Right now it's a bit of a mess.) 2. Ideally, a CM solution would keep all of the components of the DocBook toolchain (Saxon, FOP, etc.) updated, and I could simply maintain the custom stylesheets we use. Unfortunately, I don't have time to continously update the toolchain components. 3. Our company is growing, so we'll be hiring additional writers this year. Although our DocBook implementation works fine for me, it's unwieldly and difficult to train new writers. Ideally, a CM solution integrates with a user friendly, WYSIWYG authoring tool (rather than the Eclipse editor that I use). The authoring tool doesn't need to be part of the CM solution, and it could be third party tool such as the Oxygen editor. We already use Perforce to control DocBook XML source, so I don't need a CM solution for checkin/checkout. If the CM solution provided a central database repository for source control, I'd consider switching to that instead if the other CM benefits are compelling. Regards, Jeff Powanda Vocera Communications, Inc. *From:* Bob Stayton [mailto:b...@sagehill.net] *Sent:* 2012-02-03 06:58 *To:* Jeff Powanda; docbook-apps@lists.oasis-open.org *Subject:* Re: [docbook-apps] Content Management solutions that support DocBook 5.x? Hi Jeff, There is a pretty wide range of content management systems out there. All of them would support checking in DocBook files, since those are just text files. It would help if you could post some more detailed requirements. What are you looking for the system to do? How will it be used, and by how many people, etc. Bob Stayton Sagehill Enterprises b...@sagehill.net mailto:b...@sagehill.net - Original Message - *From:* Jeff Powanda mailto:jpowa...@vocera.com *To:* docbook-apps@lists.oasis-open.org mailto:docbook-apps@lists.oasis-open.org *Sent:* Friday, February 03, 2012 1:29 PM *Subject:* [docbook-apps] Content Management solutions that support DocBook 5.x? I'm looking for a content management solution that supports DocBook. I would consider both commercial and open source solutions. I would appreciate any recommendations, warnings, or tips that anyone has to offer. I'm also considering upgrading from DocBook 4.5 to DocBook 5.x, so would be interested to hear of CM solutions that support DocBook 5.x. Regards, Jeff Powanda Vocera Communications, Inc.
Re: [docbook-apps] 'endterm' with olinks?
Hi Bob, I've tested your solution and it works. Thank you very much, Giuseppe On Sun, Feb 5, 2012 at 9:16 PM, Bob Stayton b...@sagehill.net wrote: Hi, In the general case, a para is not a suitable target for a cross reference that generates text. It has no title, and it can contain block elements. Imagine an xref in the middle of a para inserting an orderedlist or table as the hot text, and you can see what confusion that might create. So by default, the stylesheet does not take the text of the para as the generated text, but instead uses the title of the section containing the para. This feature is handled by a template with mode=xref-to, which is used to generate the hot text that is used for both xref and olink. In fo/xref.xsl, you will find the template that handles that feature starts with: xsl:template match=para|phrase|simpara|anchor|quote mode=xref-to I would suggest that you add a new template to your customization layer for your case, but add a role attribute to the para to specialize it. Something like this (untested): xsl:template match=para[@role = 'endterm'] mode=xref-to xsl:apply-templates/ /xsl:template Then add a role=endterm to your para and see if that works without the xreflabel. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Giuseppe Monticelli mo...@funambol.com To: Bob Stayton b...@sagehill.net Cc: docbook-apps@lists.oasis-open.org Sent: Sunday, February 05, 2012 12:02 PM Subject: Re: [docbook-apps] 'endterm' with olinks? Hi Bob, thank you for your answer. I decided to pay the price of simplicity, and I'm applying your Approach 2. It works, but the only issue I'm facing (though it can be limited with a workaround, see below) is that the generated hot text that should come from the element identified by 'logout' ('otherid' in your example) is actually the title of the outer 'simplesect' containing the element: (REFERENCED document) [1] ... sect2 xml:id=sect-logout titleLogout/title paraLog out from the system/para bridgeheadSecurity realm: public/bridgehead simplesect titleDefinition/title para xml:id=logoutGET /api/login?action=logout/para /simplesect ... (REFERENCING document) [2] ... row entryliteralolink targetdoc=developers-guide targetptr=sect-logout olink targetdoc=developers-guide targetptr=logout role=endterm//olink/literal/entry ... /row ... (RESULT) [3] The generated hot text is then 'the section called “Definition”' instead of 'GET /api/login?action=logout' The issue can be worked around by adding an 'xreflabel' to [1], containing the same text as the element 'para' (which is very bad duplication, indeed): (WORKAROUND) [4] simplesect titleDefinition/title para xreflabel=GET /api/login?action=logout xml:id=logoutGET /api/login?action=logout/para /simplesect ... Maybe I'm overlooking something trivial. Thank you, Giuseppe On Thu, Feb 2, 2012 at 7:42 PM, Bob Stayton b...@sagehill.net wrote: This is not a feature that is currently supported, so something original is called for here. I can think of two approaches, the former more complex but more complete than the latter. ... Approach 2. Create a nested olink with a role attribute, and customize its behavior. When an olink element is processed, if the olink element is not empty, then the stylesheet just does xsl:apply-templates/ to that content and does not look up the text in the olink database. So you could do this: olink targetptr=chapteridolink targetptr=otherid role=endterm//olink In order to not create a nested link, you would need to add a template like this to your customization: xsl:template match=olink[@role = 'endterm'] xsl:variable name=content xsl:apply-imports/ /xsl:variable xsl:value-of select=string($content)/ /xsl:template You would also want to set this param so the role attribute is not interpreted as an xrefstyle, which would generate warning messages. xsl:param name=use.role.as.xrefstyle select=0/ This template matches the nested olink because of the role value. It then processes that olink with xsl:apply-imports, which would generate a normal active link to the otherid element, with text generated from the olink database for otherid. Then it takes the string value of the result. The outer olink supplies the linking wrapper for that text. With this approach, when you take the string value of the inner olink, you lose any inline formatting, but that's the price of simplicity. 8^) Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Giuseppe Monticelli To: docbook-apps@lists.oasis-open.org Sent: Wednesday, February 01, 2012 3:06 PM Subject: [docbook-apps] 'endterm' with olinks? Is there a possibility to emulate with 'olink' the behavior of the attributes 'linkend' and 'endterm' used together in the 'xref'
[docbook-apps] Google Summer of Code 2012
Google Summer of Code is beginning to ramp up again for 2012. I just updated the DocBook GSoC wiki (http://docbook.xmlpress.net) for 2012, and it is now open for ideas, mentor sign-ups, and other input. Stefan Seefeld has volunteered to be co-administrator again (thanks Stefan), and XML Press is glad to be administrative contact. If you're interested in participating, check out the wiki, add some ideas, and sign up as a mentor. Right now, the ideas page and the application page are copied from 2011, so feel free to update/remove information as appropriate. As soon as I get a few minutes, I'll update the application page with any changes for 2012. Our ability to make a credible application that gets accepted by GSoC depends almost entirely on the level of interest and participation from the community, so if you're interested, speak up. The requirements on mentors are not that large, and it's a great chance to work with smart, dedicated students. Some of the students from 2010 have become active members of the DocBook community, so we know the program helps grow our base. The application period opens up on Feb 27 and extends to March 9. You can see more of the schedule, and pointers to Google's pages about the program, at http://docbook.xmlpress.net. Best Regards, Dick Hamilton --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org