Re: Match Pattern Proposal

On 11/1/06, Alex Milowski <alex@milowski.org> wrote:
> > There is just one thing that bothers me with XSLT patterns: reusable
> > libraries that implement XSLT patterns are hard to come by, unlike
> > implementations of XPath. If an XSLT pattern implementation is not
> > available on a given platform, that means you need to implement your
> > own XSLT patterns code in order to write an XProc implementation.
> > Isn't that be too much of a burden on the implementation author?
>
> No.  Patterns are subsets of XPaths and implementors can use standard
> libraries if they so choose.

Almost. Implementors need to check that the expression is in fact a
pattern (and not something that would be an XPath expression but not a
pattern). This can be done by parsing the expression against the
grammar defined in "5.2 Patterns" of the XSLT specification.

One could argue that if implementations are typically expected to use
an XPath engine to handle patterns, having patterns instead of XPath
in the language puts everyone in a loose-loose situation: it creates
more work for implementors and unnecessarily limits the expressiveness
of pipeline authors.

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/

Received on Thursday, 2 November 2006 09:05:13 UTC