cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damiano Pezzotti" <damiano.pezzo...@libero.it>
Subject Multiple xsl for a xml file
Date Thu, 01 Jun 2000 07:56:56 GMT
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.
	at org.apache.cocoon.parser.AbstractParser.error(AbstractParser.java:93)
	at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1354)
	at org.apache.xerces.validators.dtd.DTDValidator.startElement(DTDValidator.java:692)
	at org.apache.xerces.framework.XMLParser.callStartElement(XMLParser.java:1906)
	at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:980)
	at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
	at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:84)
	at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
	at org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.java:78)
	at org.apache.cocoon.Engine.handle(Engine.java:289)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
	at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
	at java.lang.Thread.run(Thread.java:484)

Can you help me???
Thanks...


Pezzotti Damiano

E-Mail   : damiano.pezzotti@tiscalinet.it
Telefono : 0333-21.16.258
ICQ#     : 50101745

Alambitco - Laboratorio di design e sviluppo web based
E-Mail   : damy@alambitco.com
Web      : www.alambitco.com
Fax      : 02-700.432.209

Mime
View raw message