xsl-list
[Top] [All Lists]

Re: [xsl] XPath parsing in XSLT (version 2.0)

2006-11-20 17:39:24
Just feed the XPath 2.0 gramar to YACC.

Then you'll have to implemented the small and simple table-sriven
parser in XSLT and will have to feed it the YACC-generated tables
(Rules, GoTo, ... etc), probably converted from C-array format into
xml.

Should be pretty strightforward.


However, this seems like a waste of time, because there is already the
dyn:evaluate() EXSLT extension function as well as saxon:evaluate().

This means that probably there are not going to be users for an XPath
parser written in XSLT.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play




On 11/20/06, Erik Wilde <net(_dot_)dret(_at_)dret(_dot_)net> wrote:
hello.

i want to parse XPaths in XSLT (specifically, XPath 2.0 in XSLT 2.0).
has anybody heard of an existing XPath 2.0 parser implemented in XSLT
2.0? or, on a more general note: is anybody aware of something like
lex/yacc or javacc for XSLT, so that you can generate parsers from a
given syntax definition? probably pretty hard in XSLT 1.0, but should
not be too hard in XSLT 2.0, i guess.

thanks and cheers,

erik wilde   tel:+1-510-6432253 - fax:+1-510-6425814
       dret(_at_)berkeley(_dot_)edu  -  http://dret.net/netdret
       UC Berkeley - School of Information (iSchool)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--