[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Code to Translate XSLT Functions to XQuery Functio

Subject: Re: Code to Translate XSLT Functions to XQuery Functions?
From: "Marc van Grootel marc.van.grootel@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Aug 2014 00:39:32 -0000
Re:  Code to Translate XSLT Functions to XQuery Functio
.. and Saxon has
http://www.saxonica.com/documentation/extensions/instructions/import-query.ht
ml which lets you import XQuery modules. So you can share code between XSLT
and XQuery. Not in HE though.

--Marc

> On 28 aug. 2014, at 23:17, "Dimitre Novatchev dnovatchev@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Aug 28, 2014 at 11:03 AM, Eliot Kimber ekimber@xxxxxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> For the most part my functions
>> are relatively simple and except for one that uses analyze-string, they
>> are all implemented XPath expressions that will work as written in XQuery.
>
>
>
> The <xsl:analyze-string> instruction now has its analogue as an XSLT
> 3.0 function: analyze-string(),
> http://www.w3.org/TR/xpath-functions-30/#func-analyze-string
>
> As for "translating" XSLT functions to XQuery functions, this may not
> be generally possible, especially in the cases when the source
> functions use functionality that is absent in XQuery, such as applying
> templates.
>
> If one writes their functions as XPath 3.0 inline function items, then
> these are immediately usable both from XSLT and from XQuery, and from
> any other language that hosts XPath 3.0. I would recommend this
> approach, especially for writing future functions. Among other
> benefits, one achieves a single and non-redundant source, that is used
> by many hosting languages.
>
> More on writing XPath 3.0 functions, and generally on XPath
> programming, can be found here:
>
>
http://www.balisage.net/Proceedings/vol10/html/Novatchev01/BalisageVol10-Nova
tchev01.html
>
>
> --
> Cheers,
> Dimitre Novatchev
> ---------------------------------------
> Truly great madness cannot be achieved without significant intelligence.
> ---------------------------------------
> To invent, you need a good imagination and a pile of junk
> -------------------------------------
> Never fight an inanimate object
> -------------------------------------
> To avoid situations in which you might make mistakes may be the
> biggest mistake of all
> ------------------------------------
> Quality means doing it right when no one is looking.
> -------------------------------------
> You've achieved success in your field when you don't know whether what
> you're doing is work or play
> -------------------------------------
> To achieve the impossible dream, try going to sleep.
> -------------------------------------
> Facts do not cease to exist because they are ignored.
> -------------------------------------
> Typing monkeys will write all Shakespeare's works in 200yrs.Will they
> write all patents, too? :)
> -------------------------------------
> I finally figured out the only reason to be alive is to enjoy it.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.