← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: [docbook-apps] Converting Website to DB5: suppressingversion="5.0" attribute on children of root

From
Denis Bradford <>
Date
2009-11-27T14:36:48+00:00
ID
Thread
Re: [docbook-apps] Converting Website to DB5: suppressingversion="5.0" attribute on children of root
As usual, I should have dug a little more before asking for help. Found 
the source of my problem:

In db4-upgrade.xsl, the "*" mode="AddNS" template adds a version 
attribute to the root element, like this:

	<xsl:if test="not(parent::*)">
	  <xsl:attribute name="version">5.0</xsl:attribute>
	</xsl:if>

In my customization (maybe because my root is different from what 
db4-upgrade.xsl expects) the test for parent in this template doesn't 
work as expected, so the attribute is applied to some elements under the 
root.

However, my customization explicitly converts webpages to articles, and 
  hardcodes the NS and version attributes on the generated <article> 
element. So I customized the AddNS template in my stylesheet by deleting 
  the lines shown above. It seems to work fine as far as I can tell.

Thanks,
Denis
← Prev in month ← Prev in thread
Next in thread → Next in month →