You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xsp-dev@xml.apache.org by Leigh Dodds <ld...@ingenta.com> on 2002/03/22 18:13:23 UTC

Oddity with XSP and Namespaces

Hi, can anyone explain the following, or identify that this 
is a fixed bug?

Environment: Tomcat 4.0.1, Cocoon 2.0.1.

XSP Page:

<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
   <root>
   <xsp:element name="one"/>
   <xsp:element>
      <xsp:param name="name"><xsp:expr>"two"</xsp:expr></xsp:param>
   </xsp:element>
   <xsp:element name="three" uri="http://www.ldodds.com" prefix="lrd"/>
   <xsp:element>
      <xsp:param name="name"><xsp:expr>"four"</xsp:expr></xsp:param>
      <xsp:param name="uri"><xsp:expr>"http://www.ldodds.com"</xsp:expr></xsp:param>
      <xsp:param name="prefix"><xsp:expr>"lrd"</xsp:expr></xsp:param>
   </xsp:element>   
   </root>   
</xsp:page>

Pipeline:

<map:match pattern="*.xsp">
 <map:generate type="xsp" src="{1}.xsp"/>
 <map:serialize type="xml"/>
</map:match>

Results:

<root xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsp="http://apache.org/xsp">
   <one/>
   <two>      
   </two>
   <lrd:three/>
   <lrd:four>
   </lrd:four>   
</root>

Note that the namespace prefixes are present, but not the 
namespace declarations. Also note that the xml namespace is 
declared (which IE complains about, probably correctly)

If I alter the pipeline to include a stylesheet that performs 
an identity transformation (copies input to output) I 
get the expected document.

Any ideas? Is this a bug?

Cheers,

L.

-- 
Leigh Dodds, Research Group, Ingenta | "Pluralitas non est ponenda
http://weblogs.userland.com/eclectic |    sine necessitate"
http://www.xml.com/pub/xmldeviant    |     -- William of Ockham

RE: Oddity with XSP and Namespaces

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Leigh Dodds [mailto:ldodds@ingenta.com]
> 
> Thanks Vadim,
> 
> > > Hi, can anyone explain the following, or identify that this
> > > is a fixed bug?
> >
> > Ok, I can now identify that this is a *fixed* bug. Thanks for
finding.
> 
> Am I right in thinking that this will end up in Cocoon 2.0.2?


Yup. Couple of days left. Time to start counting hours ;)

Vadim

> 
> Thanks,
> 
> L.


---------------------------------------------------------------------
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: Oddity with XSP and Namespaces

Posted by Leigh Dodds <ld...@ingenta.com>.
Thanks Vadim,

> > Hi, can anyone explain the following, or identify that this
> > is a fixed bug?
> 
> Ok, I can now identify that this is a *fixed* bug. Thanks for finding.

Am I right in thinking that this will end up in Cocoon 2.0.2?

Thanks,

L.

---------------------------------------------------------------------
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: Oddity with XSP and Namespaces

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Leigh Dodds [mailto:ldodds@ingenta.com]
> 
> Hi, can anyone explain the following, or identify that this
> is a fixed bug?

Ok, I can now identify that this is a *fixed* bug. Thanks for finding.

Regards,
Vadim


> Environment: Tomcat 4.0.1, Cocoon 2.0.1.
> 
> XSP Page:
> 
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
>    <root>
>    <xsp:element name="one"/>
>    <xsp:element>
>       <xsp:param name="name"><xsp:expr>"two"</xsp:expr></xsp:param>
>    </xsp:element>
>    <xsp:element name="three" uri="http://www.ldodds.com"
prefix="lrd"/>
>    <xsp:element>
>       <xsp:param name="name"><xsp:expr>"four"</xsp:expr></xsp:param>
>       <xsp:param
> name="uri"><xsp:expr>"http://www.ldodds.com"</xsp:expr></xsp:param>
>       <xsp:param name="prefix"><xsp:expr>"lrd"</xsp:expr></xsp:param>
>    </xsp:element>
>    </root>
> </xsp:page>
> 
> Pipeline:
> 
> <map:match pattern="*.xsp">
>  <map:generate type="xsp" src="{1}.xsp"/>
>  <map:serialize type="xml"/>
> </map:match>
> 
> Results:
> 
> <root xmlns:xml="http://www.w3.org/XML/1998/namespace"
> xmlns:xsp="http://apache.org/xsp">
>    <one/>
>    <two>
>    </two>
>    <lrd:three/>
>    <lrd:four>
>    </lrd:four>
> </root>
> 
> Note that the namespace prefixes are present, but not the
> namespace declarations. Also note that the xml namespace is
> declared (which IE complains about, probably correctly)
> 
> If I alter the pipeline to include a stylesheet that performs
> an identity transformation (copies input to output) I
> get the expected document.
> 
> Any ideas? Is this a bug?
> 
> Cheers,
> 
> L.
> 
> --
> Leigh Dodds, Research Group, Ingenta | "Pluralitas non est ponenda
> http://weblogs.userland.com/eclectic |    sine necessitate"
> http://www.xml.com/pub/xmldeviant    |     -- William of Ockham



---------------------------------------------------------------------
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>