xsl-list
[Top] [All Lists]

Re: [xsl] template matching with modes, not seeing what I expect

2020-03-16 13:10:54
Ken, I would *love* to write tests that separate my sections into three
categories using simple language and the full power of XSL. I tried. I gave
up. I reverted to something simple that works.
A pointer from you might go a long way.

Keep safe
T

-----Original Message-----
From: G. Ken Holman g(_dot_)ken(_dot_)holman(_at_)gmail(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 
Sent: Tuesday, 17 March 2020 3:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com; 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] template matching with modes, not seeing what I expect

At 2020-03-16 09:58 +0000, Trevor Nicholls trevor(_at_)castingthevoid(_dot_)com 
wrote:
I'd really like to understand how to do it without counting but I seem 
to have a mental block with some kinds of nodeset logic, plus the count 
method will at least be instantly comprehensible if somebody else has 
to look at this stylesheet in the future.

I disagree. If the language isn't being used properly, someone in the know
maintaining the stylesheets will have to figure out why it wasn't used
properly in the first place and likely will have to re-engineer it to do it
correctly.

And by not using the language properly, you are missing out on the
opportunities the XSLT engine can take to optimize a proper implementation.

I saw this in the classroom: it works this way, why not just use it? 
Because the language has features and facilities that promote future
extensions of the stylesheets and extensions of the source content, they
should be used properly. One shouldn't be projecting on their style of
writing XSLT how other languages work when the basis of those other
languages is very different.

At least doing so has served me and my customers well in the past.

. . . . . . Ken


--
Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/s/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @ US$45 (5 hours free) |
Essays (UBL, XML, etc.) http://www.linkedin.com/today/author/gkholman |
--~----------------------------------------------------------------
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>