RE: [xsl] relative path from one node to another (XSLT 2.0 solution)

Subject: RE: [xsl] relative path from one node to another (XSLT 2.0 solution)
From: "Richard Lewis" <richardlewis@xxxxxxxxxxxxxx>
Date: Fri, 20 May 2005 18:25:03 +0100
On Fri, 20 May 2005 13:06:49 -0400, "Ross, Douglas" <DRoss@xxxxxxxxxx>
said:
> Richard,
> 
> Did you just say RegEx is easy?! You are much smarter than you give
> yourself credit for. :) Xpath started to make a lot more sense to me
> when I implemented a simple XPath engine in ECMA Script for finding
> nodes in HTML clients. I finally understand axis, determinates and the
> current context node. Even with this understanding, I still find a lot
> of this stuff is magic! By the way, my new moto is "XML is all!"
> 
I think the reason why regex came to mind was that development problems
with XPath and regex are quite similar, IMO. If you think about
development with a 'normal' (prepared to be flamed!) programming
language like C or Java, you can split things up into lots of little
expressions and produce lots of useful debugging output in order to get
your algorithms right, in fact, you can think in algorithms. Whereas
with XPath and regex you're wokring on a single expression to do a whole
job, almost to express an 'algorithm'; getting debugging output is more
long winded with XPath (and nearly impossible with regex). Of course
they differ in that a regex is dealing with plain text in an entirely
serial order whereas with XPath, you have to understand document
structure (which makes it, ultimately, much more powerful).

Richard

Current Thread