maurizio codogno wrote: > I am trying to tweak a DocBook stylesheet. > The quick and dirty method (i.e., editing > xxe-config:docbook/xsl/html/block.xsl ) > works, but I would like to do something cleaner. > In my .xxe config file I have the following section: > > =-=-=-=-=-= > <transform stylesheet="xsl/html/chunk.xsl" > file="__doc.xml" to="__doc.html" > > [...] lot of parameters > </transform> > =-=-=-=-=-= > > and the local stylesheet just calls the main one. > > =-=-=-=-=-= > <?xml version="1.0" encoding="US-ASCII"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:exsl="http://exslt.org/common" > xmlns="http://www.w3.org/1999/xhtml" version="1.0" > exclude-result-prefixes="exsl"> > > <xsl:import href="xxe-config:docbook/xsl/html/chunk.xsl"/> > > </xsl:stylesheet> > =-=-=-=-=-= > > I naively thought that it was sufficient to add the (modified) section > <xsl:template match="blockquote"> > [...] > </xsl:template> > > after the import, but XMLmind complains. Should I copy all files (well, > actually > docbook.xsl and block.xsl) to my userdir, or there is a simpler way to do > this?
The cleanest way to customize the XSLT style sheets used by an XXE configuration is to follow the instructions found in: http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch04s02s04.html [1] Create a customization of the DocBook configuration (mydocbook.xxe) --- <?xml version='1.0' encoding='ISO-8859-1'?> <configuration name="DocBook" xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration"> <include location="xxe-config:docbook/docbook.xxe"/> . [customization items] . . </configuration> --- [2] Create a new ``driver'' XSLT style sheet for the conversion of DocBook to multi-page HTML (mydocbook.xsl) --- <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon"> <xsl:import href="xxe-config:docbook/xsl/html/chunk.xsl"/> <xsl:template match="blockquote"> [...] </xsl:template> </xsl:stylesheet> --- [3] Tell XXE about this custom ``driver'' XSLT style sheet by adding a <property> element to mydocbook.xxe. --- <property name="docb.toHTML.transform" url="true">mydocbook.xsl</property> --- [4] Customize the parameters of the XSLT style sheet by defining a parameter group in mydocbook.xxe. --- <parameterGroup name="docb.toHTML.transformParameters"> <parameter name="callout.graphics">0</parameter> [...] </parameterGroup> --- All the above files must be created in <XXE_user_preferences_dir>/xxe2. Using a subdirectory is recommended (e.g. <XXE_user_preferences_dir>/xxe2/mydocbook/). All this should work fine with a *recent* version of XXE and should not be broken when you'll install new versions of XXE.

