commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Praher <jpra...@yahoo.de>
Subject re: [betwixt][patch] SAXBeanWriter [Was Re: [patch] SAXBeanWriter}
Date Fri, 14 Feb 2003 13:38:57 GMT
> in future, could you please prefix posts about betwixt with 
> [betwixt] and could you make sure that you use a -u diff (see 
> http://jakarta.apache.org/
> commons/patches.html). thanks. 

ok. thanks for the pointer.


> i've applied your second patch in a modified form - i've added a
> property (rather than a constructor). hope this it ok. 

it's even better, since it can be triggered on alredy constructed
instances...

> as for the first, i think i need a little more time to think 
> about this. my reading of the SAX specification indicates that 
> the current behaviour is correct (since betwixt doesn't really  
> support namespaces). on the other hand, i think that maybe 
> applying this patch is the right thing to do since a lot of 
> application rely on local name being set. 

I think it depends.

I have looked again on the SAX website and I come to the following
conclusion: [http://www.saxproject.org/?selected=namespaces]

the "" for localName should only be used if the contentHandler has
disabled namespace support.

ie. "http://xml.org/sax/features/namespaces"

I think this can't be said here, since it applies to the Parser
configuration, which we have no control when given just a ContentHandler
interface to write to.

and as in the second patch, when you embed your fragment in an existing
tree you can't tell whether the contentHandler requires namespace
support.

so I would heavily +1 for using the qName==localName, since you are
always on the safe side:

if the consumer is not capable of namespaces, it doesn't matter since
the consumer will only use the qName.

on the other hand if the consumer is capable of handling namespaces it
works too.

-- Jakob


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message