cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Ng" <>
Subject Extra namespace declarations in XML from XSP
Date Sat, 06 Apr 2002 02:58:35 GMT
[Sorry if this is being posted twice; my email is misbehaving so I'm not
sure if this went out.]

I'm running into a small nuisance with Cocoon 2.0.2 (I'm running WinXP).

After my XSP has been processed, I find the resulting xml file still has
all the namespaces from the xsp.

This is bumming me out because I have unit tests on my xml output, and I
have to update them to include these extraneous namespaces every time I
refactor my xsp's.  (Plus it's a little wasteful to pass these namespace
declarations around when they aren't needed).

To see an example of this, go to docs/samples/xsp/hello.xsp.

Change the first line to read:

<xsp:page language="java"
xmlns:foo="" exclude-result-prefixes="foo">

Then navigate to:


You should get:

<?xml version="1.0" encoding="UTF-8" ?>
<page xmlns:xsp="" xmlns:foo="">
    <para>This is my first Cocoon page!</para>
    <para>With the help of XSP and Apache Cocoon 2.0.2</para>

Notice how you get an xmlns:foo declaration here.

Exclude-result-prefixes doesn't seem to make a difference.  In my case,
I have quite a few namespaces, such as cinclude, esql, etc.

I went into esql.xsl and threw in exclude-result-prefixes="esql" on
xsl:stylesheet, but it didn't make a difference.

So now I'm stumped.

Anyone out there know how to fix this?


Stephen Ng

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message