cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Sahuc <>
Subject RE: possible bug in xsp engine in c2
Date Mon, 30 Oct 2000 13:56:15 GMT
> // Create a new element <xsp:text that wrap the quoted PCDATA
> super.startElement(Constants.XSP_URI, "text", "xsp:text",new 
> AttributesImpl() );
> super.characters(value.toCharArray(), 0, value.length());
> super.endElement(Constants.XSP_URI, "text", "xsp:text");
> now, to my eye, the qname parameter of the startElement and endElement
> method calls is unnecessary and potentially wrong. we don't 
> _know_ that
> the xsp uri is going to be mapped to the 'xsp' prefix on the 
> xsp page. the
> SAX2 api docs imply that i can simply use an empty string instead of
> "xsp:text" here - but when i try that, i get incorrect results. am i
> misusing SAX2 or am i exposing a more subtle error?


I agree with you that no code should rely on the 'xsp:' prefix, but rather
on it's declared namespace URI. 
Unfortunately, it's not that simple because we setup the reader with the
prefix-namespace property 'on', which simply means that the qname cannot be
an empty string but instead is a value aggregating the prefix along with the
local name.

So the question is rather should we still make use of the prefix-namespace
feature, and therefore depend on the prefix part, or should we be 100%
prefix independant ? Honestly I would better see the second option, but that
means some work to do ...


View raw message