|
From: Eugene K. <eu...@pl...> - 2006-04-25 05:14:22
|
I am also wondering if it is possible make default xml parser to
handle nested value, list, set, map and props tag (for simple/string types)?
Value element would be more convenient then value attribute e.g.
multiline CDATA.
Lists are also quite common use case. E.g. somehow made up example:
<meta key="org.javatx.auth.Role">
<list>
<value>Admin</value>
<value>Observer</value>
</list>
</meta>
So, as props. Here is an example:
<meta key="org.javatx.Transactional">
<props>
<prop key="timeout">1000</prop>
<prop key="propagation">required</prop>
<prop key="isolation">serializable</prop>
</props>
</meta>
Thanks
Eugene
Eugene Kuleshov wrote:
> Rob, Juergen,
>
> I noticed that it is not possible to attach metadata to the bean
> context itself. I've filed a request for that some time ago. See
> http://opensource.atlassian.com/projects/spring/browse/SPR-1646
>
> Attributes from multiple xml files could be aggregated on given
> context and beans tag could be defined like this:
>
> <!ELEMENT beans (
> description?,
> meta?,
> (import | alias | bean)*
> )>
>
> Thanks
>
> Eugene
>
>
> Rob Harrop wrote:
>
>> Its new, but you can get in one of the shiny new nightly snapshots:
>> http://www.springframework.org/snaphots
>>
>> Rob
>> On 21 Apr 2006, at 22:32, Eugene Kuleshov wrote:
>>
>>> Rob,
>>>
>>> This is really great! Can you please tell me since what build it
>>> had been avaialable? SF cvs is down and I can't see the history.
>>>
>>> Thanks in advance
>>>
>>> Eugene
>>>
>>>
>>> Rob Harrop wrote:
>>>> Eugene,
>>>> I added <meta> tags to the XML parser to allow you to attach
>>>> metadata to BeanDefinitions and to PropertyValue definitions. From
>>>> the parser you are restricted to String/String since we don't have
>>>> bean wiring running at the time the parser runs. If you need
>>>> something more extensive you can build your own tag set and add the
>>>> metadata that way.
>>>> Rob
|