OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Filtering out sections?

Hi Dave, hi Tom,

thanks for the great suggestions. I will try Daves Approach as it appears simple to me.

Thanks again, Lars

2011/11/27 David Cramer <david@thingbag.net>
Hash: SHA1

Hi Lars,
In this case, you could process the file after xincluding to remove
the wrapper section and promote the child sections. E.g.

<section role="wrapper">
 <title> Debugging</title>
             <title> Detail1 </title>
             <title> Detail2 </title>

Then then in the preprocessing xslt:

<xsl:template match="section[@role='wrapper']">
 <xsl:apply-templates select="section"/>

<xsl:template match="@*|node()">
 <xsl:apply-templates select="@*|node()"/>

It will work in this case since the doc is valid with the wrapper as
well as the wrapped content. If the wrapper were a chapter, then it
wouldn't work well because your doc wouldn't be valid at authoring
time even if it would be after pre-processing.


On 11/27/2011 05:51 AM, Lars Vogel wrote:
> Hello,
> Sorry for the earlier mail, I accidently send it out before it was
> finished.
> I have a DocBook source with I want to re-use in different
> environments.
> For example I have an web tutorial for Java Debugging which is an
> "Article" and which following the structure:
> <section> <title> Debugging</title> <section> <title> Detail1
> </title> </section> <section> <title> Detail2 </title> </section>
> </section>
> I want to re-use Detail1 and Detail2 in an larger document of type
> "book". I do this via an x-include.
> <chapter> <title>Developing Java</title> <xi:include
> xmlns:xi="http://www.w3.org/2001/XInclude"
> href="" /> </chapter>
> Unfortunately this brings also in the first section of the article
> which I would like to filter out. The desired result would be:
> <chapter> <title>Developing Java</title> <section> <title> Detail1
> </title> </section> <section> <title> Detail2 </title> </section>
> </chapter> Is that possible via a kind of filtering?
> Best regards, Lars -- Lars http://www.vogella.de - Eclipse, Android
> and Java Tutorials http://www.twitter.com/vogella - Lars on
> Twitter

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


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

http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]