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


Nevermind, seems that another customization had a bug, that broke this one as well. Now it is working as expected.

Robert

On 08/30/2012 03:28 PM, Robert Fekete wrote:

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]