You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2004/06/18 16:52:39 UTC
Bug? logicsheet-util.xsl and duplicate namespace declarations
Hi Cocoon developers,
if an input module namespace is declared twice, e.g.
xmlns:xsp-input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
and <input:param> is used for a required parameter:
<input:get-attribute>
<input:param name="name">foo</input:param>
<input:param name="module">list</input:param>
</input:get-attribute>
a ProcessingException is thrown, because the template
"get-namespace-prefix" in logicsheet-util.xsl is matching
the first namespace declaration and does not find any
parameter tags for this namespace prefix.
I think it is not a good practise to rely on namespace
prefixes. Wouldn't it be possible to use just the
namespace URIs to resolve the parameter?
-- Andreas
Re: Bug? logicsheet-util.xsl and duplicate namespace declarations
Posted by Antonio Gallardo <ag...@agssa.net>.
Andreas Hartmann dijo:
> Hi Cocoon developers,
>
> if an input module namespace is declared twice, e.g.
>
> xmlns:xsp-input="http://apache.org/cocoon/xsp/input/1.0"
> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>
> and <input:param> is used for a required parameter:
>
> <input:get-attribute>
> <input:param name="name">foo</input:param>
> <input:param name="module">list</input:param>
> </input:get-attribute>
>
> a ProcessingException is thrown, because the template
> "get-namespace-prefix" in logicsheet-util.xsl is matching
> the first namespace declaration and does not find any
> parameter tags for this namespace prefix.
>
> I think it is not a good practise to rely on namespace
> prefixes. Wouldn't it be possible to use just the
> namespace URIs to resolve the parameter?
The sample is weird and perhaps a bad practic, but if it is allowed, it
must be allowed. I made a test. Xerces allow the code you wrote above. I
made a similar change on another page (non XSP) and xerces allow that.
Can you make a patch to that?
Best Regards,
Antonio Gallardo