Helma wrote:
That's what I'm slowly starting to realise. For proper XML validation I
do need it so I assumed the parser requires this too.
That would partially explain why the binding file (without a
namespaceURI for 'oe') still maps to the source (in the source=file
situation). It would also explain the observations in
https://issues.apache.org/jira/browse/COCOON-1671
i.e. if the prefix is the same with a matching or a different
namespaceURI it binds, but if the prefix is different but the
namespaceURI is identical it fails.
So how should this be solved then?
I think there are two areas:
The first one is the parsing of the binding. We have to ensure that the
namespace prefixes are correctly send to the cforms component parsing
the binding. So we should see that there is no namespace prefix
inbetween. Actually, I fear, we can't ensure this in general. So perhaps
in these cases a workaround is required and you have to add a dummy
attribute somewhere in the binding, like <fb:... oe:something="dummy">.
This is not great, but hopefully solves this problem.
Now, the second area is more complicated. When cforms parses a binding
it should parse the paths and test them for namespaces and if these
namespaces are properly defined - if not, throw exception.
When the binding is applied, the namespaces have to be checked, if the
uri's are the same. This should then work even if different prefixes are
used. I looked into namespaces and jxpath a long time ago and I think to
remember that there were problems; so this could get ugly :(
I think this is something for our cforms and jxpath experts!
Carsten