[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Strategies for Migrating DocBook Customization in a Mixed DB4/5 Environment?
Both sets of stylesheets have templates matching on all element names from both DocBook 4 and 5, so each will work with either DocBook version, if the document namespace is adjusted in preprocessing. This works because XSL is template driven, and having templates that are not called is perfectly common. It also works because the content models between DocBook 4 and 5 are sufficiently compatible.
So adapting an existing customization layer is mostly done by adding the namespace prefix to element names and importing the ns stylesheet. This is described in:
http://www.sagehill.net/docbookxsl/CustomDb5Xsl.html Bob Stayton Sagehill Enterprises bobs@sagehill.net On 2/17/2015 3:33 AM, Jirka Kosek wrote:
On 17.2.2015 10:27, Thomas Schraitle wrote:(Of course, I could feed my new DocBook 5 sources into my existing XSL customizations. This "works", but it takes too much time because of the internal convertion of DocBook 5 to DocBook 4.)And what about converting V4 documents to V5 (for example with different filename) prior running DocBook XSL stylesheets? You automate this using make or ant, only changed files will be converted again and you will gain significant speed up.However, we have some some hefty DocBook XSL customizations; a "DocBook XSL Transition Guide" would be helpful. :) How would you deal with such migration of "old" DocBook 4 XSL customization layers?Adding namespace prefix in front of element names inside XPath expressions should be enough. Jirka
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]