You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jakob Praher <jp...@yahoo.de> on 2003/02/12 16:48:25 UTC

[patch] SAXBeanWriter

hi all,

I am using SAXBeanWriter in a Cocoon Environment.
for this I had to patch the SAXBeanWriter to do the following:

I)

startElement( "", qname, qname , atts ) instead of
startElement( "", "", qname, atts ) 

-> the same for endElement

this behaviour is the "default", looked in examples and books for sax
nodes that have no namespace.
plus the SAXTransformer used in cocoon doesn't accept the original style
(simple didn't display it )

II)

optionalized the calls to startDocument( ) endDocument( ), which are
called in start(), end( ).

add a constructor element, the default behaviour is backward
compatiblity.

reason: frequently, in generators, you don't have control over the whole
document ( this violates xml ioc ;-) )

attached you find a patch against CVS 1.6 version.

thanks

-- Jakob

[betwixt][patch] SAXBeanWriter [Was Re: [patch] SAXBeanWriter}

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi Jakob

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.

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

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.

anyone else have any thoughts on this?

- robert

On Wednesday, February 12, 2003, at 03:48 PM, Jakob Praher wrote:

> hi all,
>
> I am using SAXBeanWriter in a Cocoon Environment.
> for this I had to patch the SAXBeanWriter to do the following:
>
> I)
>
> startElement( "", qname, qname , atts ) instead of
> startElement( "", "", qname, atts )
>
> -> the same for endElement
>
> this behaviour is the "default", looked in examples and books for sax
> nodes that have no namespace.
> plus the SAXTransformer used in cocoon doesn't accept the original style
> (simple didn't display it )
>
> II)
>
> optionalized the calls to startDocument( ) endDocument( ), which are
> called in start(), end( ).
>
> add a constructor element, the default behaviour is backward
> compatiblity.
>
> reason: frequently, in generators, you don't have control over the whole
> document ( this violates xml ioc ;-) )
>
> attached you find a patch against CVS 1.6 version.
>
> thanks
>
> -- Jakob
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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