#2 computed constructors are not supported yet

closed
nobody
None
5
2007-11-14
2007-05-05
Paul King
No

I was trying to use MXQuery from Groovy with the following script:

// require(url='http://www.mxquery.org', jar='mxquery.jar')
import ch.ethz.mxquery.util.IteratorPrinter
import ch.ethz.mxquery.core.XQueryRuntime

def query = '''
<html><head/><body>
{
for $act in doc("hamlet.xml")//ACT
let $speakers := distinct-values($act//SPEAKER)
return
<span>
<h1>{ $act/TITLE/text() }</h1>
<ul>
{
for $speaker in $speakers
return <li>{ $speaker }</li>
}
</ul>
</span>
}
</body></html>
'''
def exp = new XQueryRuntime().prepareQuery(query)
println IteratorPrinter.eventsToXML(exp.evaluate())

(From Wikipedia initial example).

I received this error:

Caught: ch.ethz.mxquery.exceptions.StaticException: computed constructors are not supported yet
at HtmlXquery.run(HtmlXquery.groovy:23)
at HtmlXquery.main(HtmlXquery.groovy)

I guess this is already on your TODO list but thought I would report it anyway.

Cheers, Paul.

Discussion

    • status: open --> closed
     
  • Logged In: YES
    user_id=1641989
    Originator: NO

    Overlooked that the bug was still open, since version 0.3, computed constructors are supported