how to pass node as param for transform:transform()?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to pass node as param for transform:transform()?

Adam Retter-7
Hi Guys,

I have an XQuery script which calls transform:transform() and I need to
send an additional node set to the XSLT. I would like to do this as a
parameter but cant seem to figure it out, I get errors like this from
the XQuery -

Syntax error within user defined function local:show: expecting double
quote '\"', found '<' [at line 673, column 335]


Line 673 looks like this -

transform:transform(doc("/db/CommunityDirectory/data/1.xml"),
doc("/db/CommunityDirectory/presentation/web.xslt), <parameters><param
name="categories" value="<categories><category>cat test
1</category><category>cat test
2</category></categories>"/></<parameters>)


And my XSLT looks like this kinda thing -

<xsl:template>
        <xsl:param name="categories"/>
       
        <xsl:for-each select="$categories/node()//category>
                <xsl:value-of select="."/><br/>
        </xsl:for-each>

</xsl:template>

Any ides, comments would be useful please :-)

Thanks Adam.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to pass node as param for transform:transform()?

Michael Beddow-2
Adam,

>  <param name="categories" value="<categories><category> [etc.etc.]"

You are trying to put markup into an attribute value. No can do. Try passing
the name of a document and then read it into the xslt via xsl:document()

Michael Beddow




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...