[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Re: "if-condition-return something" idiom : is it possible in XSLT 1 ?

Subject: Re: [xsl] Re: "if-condition-return something" idiom : is it possible in XSLT 1 ?
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Jun 2014 15:58:45 -0000

On Tue, Jun 17, 2014 at 03:28:17PM -0000, Kerry, Richard richard.kerry@xxxxxxxx scripsit:
> "My preferred solution would be to move to XSLT 2.0+" "There is a DocBook XSLT 2.0 stylesheet available "
> Not up to date with the XSLT 1 version, I believe.

Nothing says you can't do a pre-pass with XSLT 2.0 to hammer all your
dates into the correct format, which the XSLT 1.0 docbook pass then
experiences as magically correct dates, requiring no extension or
alteration of the standard docbook stylesheets.  You do have to parse
everything twice but that's, in my experience, often a really good
tradeoff against trying to make one transform do everything.

There are a lot of things that fit that pattern; assigning numbers or
other content labels is another one, along with regularizing metadata.
(Since your "main" delivery transform probably wants to reference the
metadata, you'd rather it was all correct when the XML gets to the
delivery transform, rather than having to build all the regularization
and checks into the main transform.)

-- Graydon

Current Thread