I am having some problems with including XML content from a URL in a logicsheet
using <util:include-uri> and copying any unhandled XML nodes using <xsl:copy>
or <xsl:copy-of>.

I have the following XML document:

> <?xml version="1.0"?>
> <?xml-logicsheet href="portal-xsp.xsl"?>
> <?cocoon-process type="xsp"?>
>
> <portal>
>     <title>ian stevens - portal</title>
>     <boxes>
>         <box>
>             <title>Stocks</title>
>             <content>
>                 <quotes symbols="IBM,MSFT,RHAT"/>
>             </content>
>         </box>
>     </boxes>
> </portal>

And then the XSP logicsheet:

> <?xml version="1.0"?>
>
> <xsl:stylesheet version="1.0" 
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>     xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>     xmlns:util="http://www.apache.org/1999/XSP/Util";>
>
>     <xsl:template match="portal">
>         <xsl:processing-instruction 
>name="cocoon-process">type="xsp"</xsl:processing-instruction>
>         <xsl:processing-instruction 
>name="cocoon-process">type="xslt"</xsl:processing-instruction>
>         <xsl:processing-instruction name="xml-stylesheet">href="portal-html.xsl" 
>type="text/xsl"</xsl:processing-instruction>
>
>         <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"; language="java">
>             <xsl:copy>
>                 <xsl:apply-templates/>
>             </xsl:copy>
>         </xsp:page>
> 
>    </xsl:template>
>
>     <xsl:template match="quotes">
>         <util:include-uri>
>             <util:href>
>                 <xsp:expr>"http://foo/script?param="; + "<xsl:value-of 
>select='@symbols'/>"</xsp:expr>
>             </util:href>
>         </util:include-uri>
>     </xsl:template>
>
>     <xsl:template match="@*|*|text">
>         <xsl:copy-of select="."/>
>     </xsl:template>
>
></xsl:stylesheet>

As it stands, this will not even fetch the contents of the generated URL.  If I
surround <xsl:apply-templates/> with <xsl:copy> instead of using <xsl:copy-of>
in the last <xsl:template> block, the XML is not fetched but the URL with the
value of the @symbols attribute appended replaces the <stocks> element.  

Anyone have any idea what is going on?  I would like to copy any elements which
do not need to be dealt with in the logicsheet without having to worry what
they are.

I am using Cocoon 1.8.2.

thanks,
ian.

-- 
(c) ian c. stevens, 2001
PGP Key: http://istevens.dhs.org/pgp.html (Protect your privacy!)

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to