commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Re: Re: [betwixt] Versioning of XML Output
Date Sun, 21 May 2006 17:10:27 GMT
On Fri, 2006-05-19 at 08:37 +0200, Holger Haag wrote:
> Hi,
> 
> maybe there is even a better way of doing it, more flexible and probably
> about the same amount of work.

sounds good so far :-)

> Here's what to do:

(just to check that i understand correctly, i'll add examples in line.
please jump in and correct any misunderstandings)

> * Store all attributes of an element in a .betwixt file in the corresponding
> ElementDescriptor

so (for example) given

<element name='whatever' alpha='alpha-value' beta='beta-value'>

it would be possible to find out that the value for attribute 'beta' is
'beta-value' by a call to the element descriptor

> * Store all attributes of an attribute in a .betwixt file in the
> corresponding AttributeDescriptor

<attribute name='whatever' alpha='alpha-value' beta='beta-value'>

it would be possible to find out that the value for attribute 'beta' is
'beta-value' by a call to the attribute descriptor

it's already possible to attach arbitrary data to descriptors. 

<attribute name='whatever'>
    <option><name>beta</name><value>beta-value</value></option>
    ...
</attribute>

this value be retrieved by
descriptor.getOptions().getValue("beta-value").

would be best to re-use this existing mechanism. this form of extension
doesn't violate the DTD (which is why it was added that way). 

it would be possible to process extra attributes and use them to
populate options (which would then be overridden by the option elements
to preserve compatibility). would this be worth the effort?

> * Add and support new interfaces ElementSuppressionStrategy and
> AttributeSuppressionStrategy

+1

> This way, the application using betwixt can define its own custom attributes
> and strategies for suppressing elements/attributes.

+1

> Such attributes/strategies could be for example
> * Versioning: Suppress attributes/elements for older clients
> * Versioning: Suppress obsolete attributes/elements 
> * Add debug information to XML documents if desired
> * Suppress elements/attributes for smaller XML documents (to save bandwidth)
> * ...
>
> What do you think ?

sounds good :-)

fancy contributing a patch to implement this? 

(read http://jakarta.apache.org/site/getinvolved.html and
http://www.apache.org/dev/#committers) 

otherwise i should be able to start to take a look at implementing on
monday

- robert



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


Mime
View raw message