Hey Bob,
At 09:40 AM 2/17/2006, Bob wrote:
> <xsl:apply-templates select="*[not(self::y)][not(self::z)]"/>
Nice idea, I'm glad I asked!
I'd have written "*[not(self::y|self::z)]" but that amounts to the same thing.
Nevertheless I have used the technique you described, though not for
precisely the same reason (controlling ordering), so maybe it's not
the same technique.
And (thanks Michael) once again XSLT 2.0, or
in this case XPath 2.0, makes something else possible with a more concise
syntax.
Yes, XPath 2.0 is pretty cool once you get the hang of it.
I think (at least) two things were done right:
* Things that work in XPath 1.0 work in 2.0 in just the same way,
with very few exceptions, and those throw errors
* The sequences model is consistently designed, so that even though
it's very different from the "set-based" model, it's not hard to
learn. The fact that "z, y, * except (y|z)" is so straightforward is
an indication of this.
I do still have some concern that the new XPath, given its greater
complexity (especially when it comes to the data typing), won't be as
easy to learn or as easy to fake as 1.0, and consequently will prove
to be more of an impediment to picking up XSLT. (IMO XSLT has really
benefited from the fact that alert and resourceful people even with
little programming experience somehow manage to build solutions with
it, and I don't want to see this change. I ascribe this in large part
to the fact that it's possible to ignore the gnarlier possibilities
of XPath until you get a feel for template-based processing, and once
you've got that, the rest makes much more sense.) This is complicated
by sociological factors: will it prove to be less burdensome and
troublesome (and for whom?) to learn XPath 1.0 first, or just skip
it? To what extent will the user communities overlap? I can see XPath
2.0 users who have never dealt with 1.0 getting very frustrated if
they have to maintain 1.0 stylesheets.
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--