xsl-list
[Top] [All Lists]

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

2014-06-17 10:58:54
On Tue, Jun 17, 2014 at 03:28:17PM -0000, Kerry, Richard 
richard(_dot_)kerry(_at_)atos(_dot_)net 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>