[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]