[Cosmo-dev] Sharing format questions

Brian Moseley bcm at osafoundation.org
Mon Aug 14 11:48:19 PDT 2006


since we're taking the proposal back onto the list, here are my latest comments:

On 8/11/06, Morgen Sagen <morgen at osafoundation.org> wrote:

> I've put in an example of expressing lists (unordered and ordered) and
> dictionaries.  One thing I'm not sure about is this:
>
>         <kinds>
>             <value><con:Note/></value>
>             <value><cal:Event/></value>
>         </kinds>
>
> I put <value> in there to be consistent with other lists.  What do you
> think?

this is similar to spring's xml configuration language. i like their
approach a little better though. how's about taking a cue from them
and allowing these options:

1) simple scalar value  =>  <value>abcdef</value>
2) item reference  => <item ref="mySecurityManager"/>
3) kind => <kind:Note/>
4) list (ordered) =>
<list>
  <value>abcdef</value>
  <value>deadbeef</value>
</list>
5) map =>
<map>
  <entry key="bcm" ref="1"/>
  <entry key="morgen" ref="2"/>
</map>
6) set => like list, but unordered

notice i used <itemref> to <item ref=""> - i like that better, cos it
keeps the door open to using the same element for inline items should
we want to do that. i also suggest using a separate namespace for
kinds so that it's a little more obvious what <kind:Note> is.

> Also, as for a deliverable, do you think we need an XSD?  I tried my hand at
> one, but got a bit lost.  For example, I don't know how to express a custom
> data type (uuid), nor how to say that a <value> can either be an <itemref>
> or a literal value:

never written one myself either. for reference, here's the spring xsd
that defines list, set, item and value, among other things:

<http://www.springframework.org/schema/beans/spring-beans.xsd>


More information about the cosmo-dev mailing list