cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhi <su...@planet.net>
Subject XSP problem
Date Wed, 17 May 2000 20:57:34 GMT
Hi,
I don't know what I am doing is right or wrong.
Here is what I am doing.
I have an xml page (result.xml), part of it is generated by xsp.
here is the snippet..
----------------------------------------------------------------------------------

<?xml version="1.0" standalone="no"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="result-xsp.xsl" type="text/xsl"?>

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

<PAGE>
 <connectiondefs>
  <connection name="foo_connection">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://my.domain.com/my_database</dburl>
   <username>user</username>
   <password>password</password>
  </connection>
 </connectiondefs> 

  <TITLE>Search result</TITLE>
  <CONTENT>
  <xsp:logic>
    ... build the sql query dynamically based on some criteria ....
  </xsp:logic>
  <query connection="foo_connection">
      <xsp:expr>query</xsp:expr> 
  </query>
  </CONTENT>
</PAGE>
</xsp:page>
----------------------------------------------------------------------------------

The style sheet used "result-xsp.xsl" also has XSP in it. Basically
which transforms this xml into another xml.

which looks like this

----------------------------------------------------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="PAGE">
  <xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>  
  <xsl:processing-instruction name="xml-stylesheet">href="result.xsl"
type="text/xsl"</xsl:processing-instruction>  
  
  	<xsl:copy>
  	  <xsl:apply-templates/>
  	</xsl:copy> 

</xsl:template>

<xsl:template match="*|@*|text()">
 <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------------

The stylesheet specified in the above xsl transforms xml into html.

But when i try to view this, I get an error message saying that
" Could not associate stylesheet to document:  no matching stylesheet
for: netscape "

What am I doing wrong here ?

The same thing works if I have the first document as static.

Thanks in advance for any help
~Sudhi

Mime
View raw message