You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Peter, Reto" <sa...@softwareag.com> on 2002/05/24 19:45:45 UTC

XSP & Namespace Problem

Cocoon 2.0.1
SUN Solaris 7
BEA Weblogic 6.1 SP2

I've a Problem with a XSP Page, which includes data from a different
Namespace:
This is the XSP-Page:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
  language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:util="http://apache.org/xsp/util/2.0"
  xmlns:ino="http://namespaces.softwareag.com/tamino/response2">

<page>
  <xsp:logic>
    String xmlDoc = (String)request.getAttribute("Result");
  </xsp:logic>

 
<util:include-expr><util:expr><xsp:expr>xmlDoc</xsp:expr></util:expr></util:
include-expr>
</page>
</xsp:page>

In the xmlDoc, there is something like <myRecord ino:id="1">...

The message in the Cocoon Sitemap.log says, that the namespace 'ino' could
not be found in the XSP.
ExecuteThread: '11' for queue: 'default'/BiblioResult_xsp: Could not include
page
org.xml.sax.SAXParseException: The namespace prefix "ino" was not declared.
	at
org.apache.cocoon.components.parser.JaxpParser.error(JaxpParser.java:274)

I thought with the namespace declaration in the <xsp:page ... tag, it should
be solved, but it's not!
The Data from the XSP-Page are later transformed with a stylesheet, there
the namespace is also defined...
Any idea???



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: XSP & Namespace Problem

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 24.May.2002 -- 07:45 PM, Peter, Reto wrote:
> I've a Problem with a XSP Page, which includes data from a different
> Namespace:

> <util:include-expr><util:expr><xsp:expr>xmlDoc</xsp:expr></util:expr></util:
> include-expr>
 
> In the xmlDoc, there is something like <myRecord ino:id="1">...
> 
> The message in the Cocoon Sitemap.log says, that the namespace 'ino' could
> not be found in the XSP.

The data is passed through a different parser that does not inherit the
namespace declaration from your xsp. Your document must include a namespace
declaration. But you can try to slip such declaration in right after the
<util:include-expr> tag. No guarantees, though.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>