|
Loading...
|
xsl-list@lists.mulberrytech.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: [xsl] XSLT 2 processors Liam R E Quin Thu Feb 09 22:00:42 2012
On Thu, 2012-02-09 at 11:14 -0500, Wendell Piez wrote:
> Evan Lenz's work on the "Carrot" syntax for XSLT, which you possibly saw
> presented at Balisage, might give an interesting starting point for work
> on a compiler to write XQuery from XSLT 2.0. (Evan does go the other
> way, from XQuery+Carrot into XSLT.)
The hard part, I think (as Dr Kay has mentioned) is that XSLT has "match
patterns" and XQuery does not. Interpreting XSLT in XQuery directly
might be hard as a result. Or at least not very efficient.
Preprocessing to convert might work.
I remember having a conversation with Jerôme Siméon abuot the idea of
making XPath expressions and node tests as first-class objects in
XQuery, e.g. so you could pass them to functions as arguments, ask what
they matched, etc.
As it stands, apply-templates might involve something like
(for $pattern in find-candidates($match-patterns, $mode, $here)
order by $pattern/@priority
return if matches($here, $pattern[1]) then $pattern else ()
)[1]
for each node you try to match. Hmm, well, it's 7am so maybe there's a
better way. If Dmitry thought about it for 30ms he'd probably find
one. :-)
Liam
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
--~------------------------------------------------------------------
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:[EMAIL PROTECTED]>
--~--
- [xsl] XSLT 2 processors Terence Kearns 2012/02/09
- Re: [xsl] XSLT 2 processors Michael Kay 2012/02/09
- Re: [xsl] XSLT 2 processors Michael Kay 2012/02/09
- Re: [xsl] XSLT 2 processors Liam R E Quin 2012/02/09
- Re: [xsl] XSLT 2 processors Wendell Piez 2012/02/09
- Re: [xsl] XSLT 2 processors Michael Kay 2012/02/09
- Re: [xsl] XSLT 2 processors Liam R E Quin 2012/02/09 <=
- Re: [xsl] XSLT 2 processors Andriy Gerasika 2012/02/10
- Re: [xsl] XSLT 2 processors Steve Ball 2012/02/09
- Re: [xsl] XSLT 2 processors Terence Kearns 2012/02/09
- Re: [xsl] XSLT 2 processors Michael Dykman 2012/02/09
- Re: [xsl] XSLT 2 processors Terence Kearns 2012/02/09
- Re: [xsl] XSLT 2 processors Michael Dykman 2012/02/09
- Re: [xsl] XSLT 2 processors Wendell Piez 2012/02/10
- Re: [xsl] XSLT 2 processors Mark Giffin 2012/02/10
- Re: [xsl] XSLT 2 processors Wendell Piez 2012/02/10
- Re: [xsl] XSLT 2 processors Terence Kearns 2012/02/10