Project

Profile

Help

enable obsolete option saxon:default in Saxon PE/EE 9.6

Added by David Lee almost 9 years ago

I want to upgrade an app that is using an older version of Saxon/PE, and also process the XQuery docs from this app in Oxygen 17. ( using Saxon/EE) there are several thousand xquery documents currently in use that use the obsolete option saxon:default ; Is there a way of enabling the legacy be haviour in saxon 9.6?
The alternative is to parse / rewrite the docs into the new XQuery format ( declare variable $x external := 'default' ); uUt since there are so many, and they are in active (but infrquent) use and stored as fields in an RDBMS its a bit difficult to make sure every one was translated correctly.

Thanks -David


Replies (4)

Please register to reply

RE: enable obsolete option saxon:default in Saxon PE/EE 9.6 - Added by Michael Kay almost 9 years ago

I suspect that your best option is to automate the conversion by converting to XQueryX, transforming, and then converting back to XQuery.

RE: enable obsolete option saxon:default in Saxon PE/EE 9.6 - Added by David Lee almost 9 years ago

Michael Kay wrote:

I suspect that your best option is to automate the conversion by converting to XQueryX, transforming, and then converting back to XQuery.

Thanks, any suggestions on a parser/serializer to do the xquery->xqueryx and reverse ? I recall looking into this a while back and didnt find anything obvious.

RE: enable obsolete option saxon:default in Saxon PE/EE 9.6 - Added by Michael Kay almost 9 years ago

Well, XQueryX to XQuery is easy, there's an XSLT stylesheet to do it in the XQueryX spec.

For the reverse direction, there are the W3C applets at http://www.w3.org/2013/01/qt-applets/, and if you want to use them "in-house" the source code is available, but I've no idea how easy it is to work with.

The only other option I'm aware of is David Carlisle's XQ2XQX but I suspect it hasn't been updated to handle 3.0 (let alone 3.1) syntax.

Another option would be to build something using Gunther Rademacher's REX. John Lumley is presenting an XSLT 3.0 to 2.0 converter at Balisage which uses REX to manipulate the XPath level, so it's quite doable, but perhaps more effort than you want to put in.

RE: enable obsolete option saxon:default in Saxon PE/EE 9.6 - Added by David Lee almost 9 years ago

Michael Kay wrote:

Well, XQueryX to XQuery is easy, there's an XSLT stylesheet to do it in the XQueryX spec.

For the reverse direction, there are the W3C applets at http://www.w3.org/2013/01/qt-applets/, and if you want to use them "in-house" the source code is available, but I've no idea how easy it is to work with.

The only other option I'm aware of is David Carlisle's XQ2XQX but I suspect it hasn't been updated to handle 3.0 (let alone 3.1) syntax.

Another option would be to build something using Gunther Rademacher's REX. John Lumley is presenting an XSLT 3.0 to 2.0 converter at Balisage which uses REX to manipulate the XPath level, so it's quite doable, but perhaps more effort than you want to put in.

Thanks. I just tried the W3C applets ( not successful in the past) ... closer this time with the 2013 soruces, but still no cigar. ( I may send the author an email - whether or not I want them they should build -'out of the box' if its publicy posted by the W3C,
and with modern build tools thats not difficult to achieve).

Thought about Rex, may give that another chance - but the last time I looked REX did well at parsing but doesnt implement the productions ... but I could be wrong.

This may be a job for a one-off sed script ...

Thanks.

( but I've wanted this before .. there is compelling use cases for a generic XQuery -> XQueryX -> XQuery processor as a simple bundled tool, if I can figure out how to do it 'in my spare time' - I'll publish it ).'

    (1-4/4)

    Please register to reply