Jeff Powanda | 1 May 2012 08:04
Favicon

DocBook to Adobe AIR Help

Has anyone used DocBook 5 source files to generate an Adobe AIR Help system? I searched the forum and saw only a few messages from 3 years ago and wondered if any recent progress has been made. If possible, I’d like to avoid commercial options such as RoboHelp or MadCap Flare, but may be forced to go that route as a last resort.

 

Regards,

Jeff Powanda

Vocera Communications

David Cramer | 1 May 2012 14:17
Gravatar

Re: find/replace in title


Hi Jeff,
In xslt 1.0, you'll need to use a recursive template for that. Here's
an example:

http://www.dpawson.co.uk/xsl/sect2/replace.html#d8770e61

If you can do a xslt 2.0 preprocessing step, then you can use
replace() and regular expressions.

David

On 04/30/2012 05:43 PM, Jeff Storey wrote:
> I?m trying to do a find replace in the title of my docbook (the
> title is dynamically generated and if it has certain words in
> there, I want to replace them), but I?m not sure how to go about
> this. In the titlepage.xsl, I have tried replacing
> 
> 
> 
> <xsl:element name="xsl:copy-of">
> 
> <xsl:attribute name="select"> $recto.content</xsl:attribute>
> 
> </xsl:element>
> 
> 
> 
> with
> 
> 
> 
> <xsl:element name="xsl:copy-of">
> 
> <xsl:attribute 
> name="select">translate($recto.content,"'FindMe'","'ReplaceMe'")</xsl:attribute>
> 
> 
> 
> </xsl:element>
> 
> 
> 
> This ends up producing all sorts of garbage objects, and I suspect
> this is because I have a mediaObject on my title page.
> 
> 
> 
> I?m really just trying to do the find/replace inside the title tags
> of my docbook xml. Can someone point me in the right direction on
> this?
> 
> 
> 
> Thanks,
> 
> Jeff
> 
> 
> 

David Cramer | 1 May 2012 17:37
Gravatar

Re: learning more


I also like Michael Kay's book. It's especially good if you want a
thorough treatment.

This page on the DocBook wiki lists some resources and other books:

http://wiki.docbook.org/LearningDocBook

I also agree that finding an xslt project and tackling it is a great
way to learn. The trick is finding something that 1) you need to do
and 2) is hard enough to make you stretch, but not so hard as to be
impossible.

David

On 04/30/2012 03:53 PM, Richard Hamilton wrote:
> Tim,
> 
> I use Michael Kay's XSLT 2.0 book. It has some flaws (like being
> hard to navigate; both because the headers don't contain enough
> information and because some basic concepts are spread around), but
> it has some extensive examples and a lot of detail. It also does a
> pretty good job of identifying 2.0 vs. 1.0 features. It also covers
> XPath pretty well.
> 
> Regardless of which book or other resources you use, I would
> suggest "assigning" yourself some basic tasks to try and learn by
> doing. For example, I wrote a stylesheet for the IEEE publication
> format just to learn how to deal with a two-column format. Doing
> that format also forced me to figure out how to do a run-in section
> heading and some other things I wouldn't have otherwise thought of.
> There are all sorts of customizations you can try out that will get
> you into the stylesheets and teach you XSLT.
> 
> Good luck.
> 
> Dick Hamilton ------- XML Press XML for Technical Communicators 
> http://xmlpress.net hamilton <at> xmlpress.net
> 
> 
> 
> On Apr 30, 2012, at 12:34 PM, Tim Arnold wrote:
> 
>> hi, I'm using DocBook 5 and creating HTML using the stylesheets
>> with a few customizations of my own. I understand xslt a bit, but
>> I'm just a beginner. If my goal is to comfortably understand the
>> docbook stylesheets (particularly the upcoming xslt2.0 version),
>> what can I do to learn more?
>> 
>> I am already reading the xslt 1 code and consulting the DocBook
>> XSL book and 'the XSL companion' (bradley,2000). So I am at the
>> point where, if it were a spoken language I could ask simple
>> questions but not have a great conversation.
>> 
>> So, books, online resources, courses? thanks for any
>> suggestions.
>> 
>> --Tim Arnold
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
>> For additional commands, e-mail:
>> docbook-apps-help <at> lists.oasis-open.org
>> 
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail:
> docbook-apps-help <at> lists.oasis-open.org
> 

Jirka Kosek | 2 May 2012 11:58
Picon
Favicon
Gravatar

Re: DocBook to Adobe AIR Help

On 1.5.2012 8:04, Jeff Powanda wrote:
> Has anyone used DocBook 5 source files to generate an Adobe AIR Help system? I searched the forum and saw
only a few messages from 3 years ago and wondered if any recent progress has been made. If possible, I'd like
to avoid commercial options such as RoboHelp or MadCap Flare, but may be forced to go that route as a last resort.

AFAIK it shouldn't be that much work to customize WebHelp to generate
AIR Help. In AIR Help you usually create only very simple app which
works as a facade on top of emeded Web browser.

				Jirka

--

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka <at> 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
------------------------------------------------------------------

Carlos Araya | 2 May 2012 18:52
Picon

Which template to change to new roles to Docbook elements for HTML output?

I would like to add additional classes to my epub3 output.  I looked at Bob's book
(http://www.sagehill.net/docbookxsl/AddNewTemplate.html#AttValueFormatting) and from what I
understand I have to pick an existing template. 

Which templates do I need to use if I want to change imageobject and sect1 tags?

Carlos
Joshua J Wulf | 3 May 2012 07:46
Picon
Favicon

Delete child <section> via xsl

Hi, can anyone help me with a xsl question?

I'd like to do the following with an xsl template:

If a section or chapter contains an immediate child section with the same title, then
delete the child's<section/>  and<title/>  tags, but not the contents between the child<section>  and</section>.

- Josh

(Apologies if this is the wrong list for sort of question)
Jirka Kosek | 3 May 2012 10:43
Picon
Favicon
Gravatar

Re: Delete child <section> via xsl

On 3.5.2012 7:46, Joshua J Wulf wrote:

> If a section or chapter contains an immediate child section with the
> same title, then
> delete the child's<section/>  and<title/>  tags, but not the contents
> between the child<section>  and</section>.

And do you need standalone transformation or do you want such thing
happen during processing of your document by DocBook XSL stylesheets?

				Jirka

--

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka <at> 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
------------------------------------------------------------------

Dermot O'H | 3 May 2012 13:59
Picon

Re: Profiling/Conditional Text in Webhelp


David, thanks very much. That did the trick! Very much appreciated. 

For anybody else using the latest snapshots you may run into a problem with
the way the first xslt task in the sample build.xml embeds the sysproperty
"org.apache.xerces.xni.parser.XMLParserConfiguration". This causes an error
along the lines of "xslt does not support embedded sysproperty". You can get
around this by using Ant's java task to call Saxon instead of xsltproc. 

David Cramer wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Dermot,
> Please use the latest version from the snapshots machine:
> 
> http://snapshots.docbook.org/
> 
> That version supports profiling (set the appropriate profile.* param
> in your build file) and includes many other improvements.
> 
> A new release of the xsls will be out soon.
> 
> Thanks,
> David
> 
> On 04/19/2012 10:50 AM, Dermot O'H wrote:
>> 
>> Hi,
>> 
>> I use Docbook's profiling (i.e. conditional text) facility to
>> produce different flavours of content. This works great for HTML
>> and PDF output. I've recently started using the Webhelp output
>> format 
>> (http://blog.kasunbg.org/2010/08/docbook-webhelp-project.html). The
>> problem is that Webhelp's stylesheet does not perform any
>> conditional processing when producing its output despite I
>> including the xhtml/profile-chunk.xsl file during the processing
>> (as with the profiled HTML and PDF processing).
>> 
>> Has anyone any experience with this? I'm wondering if the
>> chunking-related templates in the Webhelp stylesheet are causing
>> profiled-chunking to be ignored somehow?
>> 
>> Rgds, Dermot
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQEcBAEBAgAGBQJPkDn8AAoJEMHeSXG7afUhPeoH/iPaDsJLI6d655YMd+tZq2KV
> bplVoRzp99YRl5ege6ddhKjoi1A6t093QT/tBXQDn+IjLV0e9FYUPS59i15Iolzk
> 5NqYck1LXhF0XxONSVuEOaLTQUWZ7/YEtnyV5z45E3rJl/8aTKnQIqztex+IQuHt
> 5Tk92GpWmRQCwwNzC0+MHY8a+W33F435huZwcjbhT6GDD3iengERHu/SLqVLUCmv
> h/WhGY6/C2dFyWZhVLM7GcUfQvNuoaSUugQNJIDYHh99sYqLGe6Op2mD+V7+pKQ+
> 0EaHvin+9VkU+k7tXek66vKAVT3VPLMasl7lWOzJZyYVH5aE4LV4D3X2XpXDZ2o=
> =27T1
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
> 
> 
> 
--

-- 
View this message in context: http://old.nabble.com/Profiling-Conditional-Text-in-Webhelp-tp33715122p33763411.html
Sent from the docbook apps mailing list archive at Nabble.com.
Kasun Gajasinghe | 3 May 2012 14:04
Picon
Gravatar

Re: Profiling/Conditional Text in Webhelp



On Thu, May 3, 2012 at 5:29 PM, Dermot O'H <dermot.ohalloran <at> gmail.com> wrote:


David, thanks very much. That did the trick! Very much appreciated.

For anybody else using the latest snapshots you may run into a problem with
the way the first xslt task in the sample build.xml embeds the sysproperty
"org.apache.xerces.xni.parser.XMLParserConfiguration". This causes an error
along the lines of "xslt does not support embedded sysproperty". You can get
around this by using Ant's java task to call Saxon instead of xsltproc.


Hi Dermot,
Didn't know that this works too. The recommended way for this would be to upgrade the ANT version to 1.8.0+ though. This is now reflected in the snapshot docs. http://snapshots.docbook.org/xsl/webhelp/docs/content/ch02s01.html
 
Cheers,
--Kasun




David Cramer wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Dermot,
> Please use the latest version from the snapshots machine:
>
> http://snapshots.docbook.org/
>
> That version supports profiling (set the appropriate profile.* param
> in your build file) and includes many other improvements.
>
> A new release of the xsls will be out soon.
>
> Thanks,
> David
>
> On 04/19/2012 10:50 AM, Dermot O'H wrote:
>>
>> Hi,
>>
>> I use Docbook's profiling (i.e. conditional text) facility to
>> produce different flavours of content. This works great for HTML
>> and PDF output. I've recently started using the Webhelp output
>> format
>> (http://blog.kasunbg.org/2010/08/docbook-webhelp-project.html). The
>> problem is that Webhelp's stylesheet does not perform any
>> conditional processing when producing its output despite I
>> including the xhtml/profile-chunk.xsl file during the processing
>> (as with the profiled HTML and PDF processing).
>>
>> Has anyone any experience with this? I'm wondering if the
>> chunking-related templates in the Webhelp stylesheet are causing
>> profiled-chunking to be ignored somehow?
>>
>> Rgds, Dermot
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJPkDn8AAoJEMHeSXG7afUhPeoH/iPaDsJLI6d655YMd+tZq2KV
> bplVoRzp99YRl5ege6ddhKjoi1A6t093QT/tBXQDn+IjLV0e9FYUPS59i15Iolzk
> 5NqYck1LXhF0XxONSVuEOaLTQUWZ7/YEtnyV5z45E3rJl/8aTKnQIqztex+IQuHt
> 5Tk92GpWmRQCwwNzC0+MHY8a+W33F435huZwcjbhT6GDD3iengERHu/SLqVLUCmv
> h/WhGY6/C2dFyWZhVLM7GcUfQvNuoaSUugQNJIDYHh99sYqLGe6Op2mD+V7+pKQ+
> 0EaHvin+9VkU+k7tXek66vKAVT3VPLMasl7lWOzJZyYVH5aE4LV4D3X2XpXDZ2o=
> =27T1
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>
>
>
--
View this message in context: http://old.nabble.com/Profiling-Conditional-Text-in-Webhelp-tp33715122p33763411.html
Sent from the docbook apps mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org




--
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe
Software Engineer; WSO2 Inc.; http://wso2.com,

Joshua Wulf | 3 May 2012 15:20
Picon
Favicon

Re: Delete child <section> via xsl


----- Original Message -----
From: "Jirka Kosek" <jirka <at> kosek.cz>
To: "Joshua J Wulf" <jwulf <at> redhat.com>
Cc: docbook-apps <at> lists.oasis-open.org
Sent: Thursday, May 3, 2012 6:43:05 PM
Subject: Re: [docbook-apps] Delete child <section> via xsl

On 3.5.2012 7:46, Joshua J Wulf wrote:

> If a section or chapter contains an immediate child section with the
> same title, then
> delete the child's<section/>  and<title/>  tags, but not the contents
> between the child<section>  and</section>.

And do you need standalone transformation or do you want such thing
happen during processing of your document by DocBook XSL stylesheets?

				Jirka

Hmmm... good question.

The child will be in an xi:included file, so the xsl will need to be applied after xi:includes are resolved.

I'm not sure where the best place to do that is....

Gmane