Ok, just FYI so others will know that there is a solution to the problem:
The output is messed up because after resolving the xincludes, the <topic> tag
is around the xincluded steps. I wasn't able to make it go away from XSL, so
after resolving the xincludes but before creating the output format I run a
shell script on the XML file that removes the lines that begin with <topic or
</topic . Not elegant, but gets the job done.
Robert
On 08/31/2012 12:41 PM, Robert Fekete wrote:
> Ehh, I was writing too fast. The problem described in my initial email is still
> not solved, any help is appreciated.
>
> On 08/31/2012 12:38 PM, Robert Fekete wrote:
>
>> 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>
>>>
>>> <step>Step 1
>>> <step>Step 2
>>> <step>
>>> <xinclude href="file2.xml">
>>> </procedure>
>>> <procedure>
>>>
>>> <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
>>> 3. Common step 1
>>> 4. 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>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org>> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org>
>