failure to parse eXist function in xquery
Issues related to W3C XQuery.
-
- Posts: 2
- Joined: Mon Aug 13, 2012 7:13 pm
failure to parse eXist function in xquery
The error I get from oxygen is:
I'm having trouble understanding what the problem might be with the saxon parser(s)(I've tried all three).
I'm using oxygen 14 and eXist 1.4.2.
My query is shown at the bottom, below. The line flagged as the error is the one that goes
I use the same exist.jar file in the oxygen data source tool as I use on the eXist server.
The same query works as expected when pasted into the eXist sandbox, or run by a perl XMLRPC tool using the same query file as specified for the oxygen editor.F [Saxon-PE XQuery 9.4.0.3] Cannot find a matching 3-argument function named {http://exist-db.org/xquery/transform}transform()
I'm having trouble understanding what the problem might be with the saxon parser(s)(I've tried all three).
I'm using oxygen 14 and eXist 1.4.2.
My query is shown at the bottom, below. The line flagged as the error is the one that goes
The eXist funciton signatures are here: http://exist-db.org/exist/functions/transform/transform... <any/>,
I use the same exist.jar file in the oxygen data source tool as I use on the eXist server.
Code: Select all
declare namespace local = "http://www.local.com";
declare namespace xsl = "http://www.w3.org/1999/XSL/Transform";
declare namespace transform = "http://exist-db.org/xquery/transform";
declare function local:total-hours-from-duration
( $duration as xs:dayTimeDuration? ) as xs:decimal? {
$duration div xs:dayTimeDuration('PT1H')
} ;
declare function local:format-number($n as xs:decimal ,$s as xs:string) as xs:string {
string(transform:transform(
<any/>,
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match='/'>
<xsl:value-of select="format-number({$n},'{$s}')"/>
</xsl:template>
</xsl:stylesheet>,
()
))
};
let $cd := xs:dateTime(fn:current-date())
for $ss in
collection('/db/homer/2012/07')//sampleSet/site[@name='LCO']
let $sdt := dateTime(xs:date($ss/../../@sampleDate),xs:time($ss/../@time))
let $dif := local:format-number(local:total-hours-from-duration($cd - $sdt), "#,###0.00#" )
order by $dif descending
return
<Record>
<When>{$sdt}</When>
<Ago>{$dif}</Ago>
{for $r in distinct-values($ss//Description/race)
let $N := count($ss//Description[race=$r])
order by $r descending
return <line>{$r} :: {$N} </line>}
</Record>
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: failure to parse eXist function in xquery
Hello,
Note that transform:transform function from your XQuery file is an eXist function and Saxon engine does not recognize eXist functions.
To execute the eXist XQuery in oXygen you should use the eXist connection as the XQuery processor. To do this, you need to configure a transformation scenario (Document -> Transformation-> Configure Transformation Scenario) and choose the eXist connection in the "Transformer" combo box.
Regards,
Ionela
Note that transform:transform function from your XQuery file is an eXist function and Saxon engine does not recognize eXist functions.
To execute the eXist XQuery in oXygen you should use the eXist connection as the XQuery processor. To do this, you need to configure a transformation scenario (Document -> Transformation-> Configure Transformation Scenario) and choose the eXist connection in the "Transformer" combo box.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service