Re: [xsl] Quasi-Literals and XML

Subject: Re: [xsl] Quasi-Literals and XML
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Thu, 1 Feb 2001 20:28:57 -0000
On Thursday, February 01, 2001 7:24 PM
David Carlisle wrote:

> In an ideal world, perhaps, but in practice one often wants to query
> into the structure of the character data of an XML file. You could
> that you should be using a character based regexp engine for that
> than a structure based transform like xslt, but often the characters
> you want to query are stuck away in the XML structure, so you need
> XML query language (xslt/xpath or perhaps xquery one day) to find
> your looking for, then some character based searching once you get
> there.

I take that point, but at the moment I'm meeting that problem by
using a thin Perl wrapper round expat (where there are id's to go
straight for)
or Matt's XML::Xpath (where a full XPath is needed) to go in, grab my
data, munge it using the full Perl regex engine, then spit it out as
xml fragement for piping on to an XSLT processor and out to the
I'm not too keen to press for XSLT extensions that would let me do all
that *within* XSLT, at the cost maybe of its efficiency in doing what
already does so well.
> If you want to query into the structure of these things using an
> appropriate tool then one needs an API so that XSLT can pass the
> appropriate text to that tool.

Again, agreed, but please let's have those API's available for more

> Sometimes that may be in fact the way to
> go, but there is a middle ground between that and the current rather
> primitive string handling of contains() and substring(). Having some
> kind of string matching capability would make an awful lot of
> a lot easier.

After my current struggles with Chinese, Japanese and Sanskrit in the
same chunks of PCDATA I couldn't agree more. All the same, I wouldn't
like to see the energies of the XSLT implementers being too much
diverted into implementing what other languages can do already,
instead of extending the distinctive transformation capabilities.

Michael Beddow

 XSL-List info and archive:

Current Thread