Re: [xsl] XSLT/XPath 2.0: a USEFUL way to provide lexical info

Subject: Re: [xsl] XSLT/XPath 2.0: a USEFUL way to provide lexical info
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sun, 6 Jan 2002 13:48:01 +0000
Hi Matt,

> I think, as a user, I'd rather see a "lexical" XPath axis (pair?),
> to let me hop back & forth between the tree w/ the lexical
> constructs and without. I think this would be much easier to use,
> and its use could be better encapsulated within a small number of
> templates.
>
> I envision that the "lexical" XPath axis could be an optional
> feature of XPath 2.0, just as support of the lexical constructs are
> proposed as an optional feature of XSLT processors.
>
> Does anyone like this idea or see any fundamental problems with it?
> Perhaps it's too late for XSLT/XPath 2.0, but I really think it's
> the most sensible approach to dealing with lexical information
> (particularly entity references).

I can see the advantages of this idea, particularly because, as you
say, it allows you to only care about lexical information in certain
contexts. It would also get around some of the problems that we've
discussed previously on this list, to do with constructing paths that
will work whether or not lexical information about entities is
available in the node tree.

One potential problem might be that without a global switch, which
means the processor either parses the source document to create a
normal node tree or one with lexical constructs, processors will end
up having to store both versions of the node tree, which would make
every transformation take up a lot more memory.

Of course I'm sure some processors would be clever - they could run
through the stylesheet and detect whether lexical constructs were
actually needed for a particular stylesheet, and only construct the
tree including lexical constructs if it were necessary, but I wonder
whether this is too much to expect.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread