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] Customizing the topic element


Hi Bob,

thank you very much for your help.
I'll try it.

Regards,

Robert

On 09/25/2012 07:09 PM, Bob Stayton wrote:

Hi,
You would need to modify the template for procedure to get the steps back in the
correct order. In the template with match="procedure" in fo/lists.xsl, the
$preamble variable is set to gather up everything in the procedure that is not a
title or a step, in accordance with the content model for procedure. It also
creates a $steps variable containing the step elements. If you adjust the
definitions of those two variables to account for topic child of procedure, you
should be able to retain the order of the imported steps.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

--------------------------------------------------
From: "Robert Fekete" <frobert@balabit.com>
Sent: Thursday, August 30, 2012 6:28 AM
To: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Subject: [docbook-apps] Customizing the topic element

Hi,

I am still trying to make it possible to xinclude a group of elements to
multiple places in a document, and be able to validate every file. The
simplified use-case is the following:

file1.xml:
...
<procedure>
<title>Procedure 1</title>
<step>Step 1
<step>Step 2
<step>
<xinclude href="file2.xml">
</procedure>
<procedure>
<title>Procedure 2</title>
<step>Step 1
<step>Step 2
<step>
<xinclude href="file3.xml">
</procedure>
...
file2.xml (includes steps common for both procedures):
<topic>
<step>Common step 1
<step>Common step 2
<step>
</topic>


My problem is that when including file2, I get error messages:
"Element step in namespace 'http://docbook.org/ns/docbook' encountered in
topic, but no template matches."

That's not surprising, so I added a custom template that (I hope) calls the
proper template for every element found in topic/step:
<xsl:template match="d:topic/d:step">
<xsl:for-each select="./*">
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:template>

However, in the output the steps from the topic are located at the top of the
procedure (and are not numbered), so it looks like:
Common step 1
Common step 2
1. Step 1
2. Step 2

(Instead of
1. Step 1
2. Step 2
Common step 1
Common step 2
(Similar thing happens when xincluding a topic containing listitems into an
itemizedlist.)
)

How can I tell the stylesheets to treat the child nodes of a topic as if the
topic node weren't there?

Kind Regards,

Robert


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







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