You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Niclas Hedhman <ni...@localbar.com> on 2000/04/13 11:04:39 UTC
Namespace problems in Cocoon 2
I don't fully understand namespaces... But there is a problem in the
NamespacesTable class.
I have modified the method resolve() to report what the problem is;
if (raw.length()>0) {
// The raw name was specified
int pos=raw.indexOf(':');
if (pos>0) {
// We have a namespace prefix:local separator
String pre=raw.substring(0,pos);
String loc=raw.substring(pos+1);
if (prefix.length()==0) prefix=pre;
else if (!prefix.equals(pre))
throw new
SAXException("Raw("+pre+")/Prefix("+prefix+") Name mismatch in '" + raw
+ "'.");
if (local.length()==0) local=loc;
else if (!local.equals(loc))
throw new
SAXException("Raw("+loc+")/Local("+local+") Name mismatch in '" + raw +
"'.");
} else {
And I get;
Raw(space)/Local(xml:space) Name mismatch in 'xml:space'.
But that means that raw equals local, so why is loc computed? Is the
problem from the calling side?
org.apache.cocoon.xml.util.DocumentHandlerWrapper.startElement(DocumentHandlerWrapper.java:138)
I also suspected that I didn't have a
xmlns:xml="http://www.w3.org/TR/REC-xml"
in the <xsl:stylesheet> tag.
Also, as far as I can tell, I don't have any xml:space anywhere.
Anybody understand this?
I don't understand a single thing around this code.
Niclas