Lists Home |
Date Index |
Simon St.Laurent wrote:
> email@example.com (Thomas B. Passin) writes:
> >We all have to code to context, but I'll bet that just about everyone
> >tries to minimize context-sensitive processing whenever possible. I'd
> >rather not do anything that adds to the context that needs to be
> The biggest change in my recent work is that I'm taking context more and
> more seriously. I think it may be something we avoid early on, but
> value later.
> The big lesson I get from XPath is that it's a great, even easy, way to
> specify context. That's something worth building on.
The big lesson that should be realized is that this success of XPath is an
example of handling "context" in a declarative rather than processing based
(e.g. stack) fashion.
That is to say: one way of handling context is via code in a SAX event
handler (and this code is often rewritten by each programmer who codes an
event handler) vs. by defining context as (a function of) the "semantics" of
an XPath string.
That might sound like a mouthful, and we know many many programmers who
liberally sprinkled profanity on their initial experiences with XSLT, but
once the cognitive hurdle of XSLT has been overcome, declaring context
rather than coding it, is a liberating experience.