[Top] [All Lists]

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

2020-03-16 09:35:01
At 2020-03-16 09:58 +0000, Trevor Nicholls trevor(_at_)castingthevoid(_dot_)com 
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>