Hi all!
I'm currently working on a xslt transform driven from xquery and have some
parameters including a document node that I want to pass to the xslt.
However I get an error whit the following code.
.........
let $metaInputDoc := xdmp:eval('declare variable $metaInputPath external;
fn:doc($metaInputPath)',$evalParams,$xqueryevalOptions)
let $imageParams := map:map(
<map:map xmlns:map="http://marklogic.com/xdmp/map">
<map:entry>
<map:key>imageMetaData</map:key>
<map:value>{$metaInputDoc}</map:value>
</map:entry>
<map:entry>
<map:key>metaDatabase</map:key>
<map:value>{$metaDatabase}</map:value>
</map:entry>
<map:entry>
</map:map>)
(:here the problems begins....:)
let $metaDocs :=
xdmp:xslt-invoke("/bilddatabas/Image_transform.xsl",$curDoc,$imageParams,<options
xmlns="xdmp:eval"><database>{xdmp:database($metaDatabase)}</database></options>
)
return $metaDocs
And the xslt params are declared as follows
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:db="http://docbook.org/ns/docbook"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
<!-- Paramaters to the transform -->
<!--imageMetaData is the metadata created when the thumbnails are created-->
<xsl:param name="imageMetaData" as="document-node()"/>
<-oxygen complains here
<xsl:param name="metaDatabase"/>
And last the error message
XDMP-AS: (err:XPTY0004) <xsl:param name="{ imageMetaData }" as="{
document-node() }"/><xsl:param name="{ metaDatabase }"/><xsl:param name="{
thumbsBaseDir }" as="{ xs:string }"/><xsl:param name="{ hostName ..... Shortend
it down..... -- Invalid coercion: <images
xmlns:map="http://marklogic.com/xdmp/map"> <image> <name>9789144027975/image001.eps</name> <id...</images>
as document-node()
Is this that it's not possible to pass a document node as a parameter into an
xslt transform from xquery in marklogic or is it that I'm doing it wrong?
Any help is appreciated :)
Best Regards
Erik
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general