Re: relative path from one node to another (XSLT 2.0
At 12:32 PM 5/20/2005, you wrote:
Yes, thats right. I think I did say I was doing it like that; but not because I thought that was a good way of doing it - just an easy way. Yet again, my ignorance of XPath comes through: I never knew there were intersect and except operators! (I wonder if XPath ignorance is widespread or whether its just me? Is XPath difficult? I get on with C all right and regular expressions are easy, but I often seem to get stuck with XPath. Does anyone else feel like this?.....)
Yes, for sure. While XPath is powerful and, considering what it does, quite elegant, it is also not obvious. (Deceptively so: the short syntax *looks* obvious, until it isn't.) This is why, if you read this list over time, you'll find that XPath lessons are ongoing at all levels. (Despite our ejecting people who say it's no fun.)
On the other hand, at least XPath 1.0 is simple enough that you can learn the entire thing in three hours, if you have the benefit of a course or instructor to lead you through it. (XPath 2.0 is going to take somewhat longer.) When my company teaches XSLT to anyone who has tried first to use it on their own, we inevitably get cries of appreciation -- "oh, *that's* what it does! now it all makes sense!" as we cover XPath. So it's not that the language is so difficult: it's just somewhat obscure and hard to make correct guesses about, and hence difficult and recalcitrant for users who insist on learning the hard way, by trial and error. By the same token, users who take the trouble to do a little homework first before diving into it generally find that the effort pays for itself quite quickly.
The world will be very different when XPath is part of the middle school curriculum.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format