[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: DocBook XSL*2* stylesheet reorganization
/ Norman Walsh <ndw@nwalsh.com> was heard to say: | Fair warning to those of you living on the bleeding edge. Ok. So I reconsidered a bit and didn't end up going the named-template route after all. But I did change things around. Here's the new idiom for XSLT2 customization layers: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:db="http://docbook.org/ns/docbook" xmlns:f="http://docbook.org/xslt/ns/extension" exclude-result-prefixes="xs db f" version="2.0"> <xsl:import href="/path/to/base/format/docbook.xsl"/> <xsl:template match="/"> <!-- You must do this or the stylesheets won't work --> <xsl:variable name="normalized" as="document-node()" select="f:cleanup-docbook(/)"/> <!-- This checks that the root is a valid root. There's a two-argument form that takes an ID. It will return the node with that ID. --> <xsl:variable name="root" as="element()" select="f:docbook-root-element($normalized)"/> <xsl:apply-templates select="$root"/> </xsl:template> </xsl:stylesheet> Checking in now. Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | What is familiar is what we are http://www.oasis-open.org/docbook/ | used to; and what we are used to Chair, DocBook Technical Committee | is most difficult to 'Know'--that | is, to see as a problem; that is, | to see as strange, as distant, as | 'outside us'.-- Nietzsche
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]