cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Multiple xsl for a xml file
Date Thu, 14 Sep 2000 23:40:30 GMT
The original message should have been sent to cocoon-users not cocoon-dev.

"Damiano Pezzotti" <damiano.pezzotti@libero.it> wrote:
>I want to associate dinamically an xsl stylesheet to an xml file.
>In the Cocoon Documentation I found an example to do it.
>I wrote this xml :
>
><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>
><xsp:processing-instruction name="xml-stylesheet">
>   href="<xsp:expr>request.getQueryString()</xsp:expr>"
>   type="text/xsl"
></xsp:processing-instruction>
><?cocoon-process type="xsp"?>
><?cocoon-process type="xslt"?>
>
>
><!DOCTYPE novel [
>  <!ENTITY mdash "--">
>  <!ENTITY ldquo "``">
>  <!ENTITY rdquo "''">
>  <!ENTITY lsquo "`">
>  <!ENTITY rsquo "'">
>  <!ENTITY hellip "...">
>]>
>
><xsp:page
>   language="java"
>   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >
>
><novel>
>
>  <front>
>   <title>The Heart of Darkness</title>
>   <author>Joseph Conrad</author>
>......................................
>
>In this mode I want to pass the xsl stylesheet as a parameter in the url.
>But I have this exception
>
>org.xml.sax.SAXParseException: The namespace prefix "xsp" was not declared.

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page
   language="java"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
 >

<novel>
<xsp:pi target="xml-stylesheet">
  <xsp:expr>request.getQueryString()</xsp:expr>
</xsp:pi>

...

Despite the documentation, target= will work (Stefano's just changed it on 
the CVS server but I'm about to change it back, because it should not be 
changed to break existing code)



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message