Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] alternate schema for group math in XML

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] alternate schema for group math in XML


Chronological Thread 
  • From: "GW Brown, Information Systems and Computing" <>
  • To: Tom Barton <>, Grouper Dev <>
  • Subject: Re: [grouper-dev] alternate schema for group math in XML
  • Date: Thu, 15 Jun 2006 20:29:08 +0100

I don't feel too strongly about this but I wouldn't worry too much about relying on the order of elements. XML parsers will always return elements in the order they appear. XML has no meaning other than what you give it, so it is always up to the code to interpret it - which should be based on any annotations in the Schema / other documentation you provide.

Gary

--On 14 June 2006 16:56 -0500 Tom Barton
<>
wrote:

Gary presented an initial draft of how to represent composite groups in
the XML import/export schema, as follows:

<list field='members' groupType='base'>
<composite>
<groupRef id='d2823e8a-303f-4703-8b13-cd669586e76e'
name='qsuob:fionas'
displayName='QS University of Bristol:fionas'/>
<compositeType>union</compositeType>
<groupRef id='d2427186-3260-4651-a44e-acdca7f6c29f'
name='qsuob:keiths'
displayName='QS University of Bristol:keiths'/>
</composite>
</list>

I raised a concern that this format relies on the order of presentation
of the two groupRef elements when the compositeType is "complement". I
think this should be schematically declared so that any XML-faithful
parser that deployers use should have a chance to get it right.

So here's an alternative:

<list field='members' groupType='base'>
<composite type="complement"/>
<groupRef operand="1"
id='d2823e8a-303f-4703-8b13-cd669586e76e'
name='qsuob:fionas'
displayName='QS University of Bristol:fionas'/>
<groupRef operand="2"
id='d2427186-3260-4651-a44e-acdca7f6c29f'
name='qsuob:keiths'
displayName='QS University of Bristol:keiths'/>
</composite>
</list>

The "operand" attribute is only required for the "complement" composite
type. By convention the composite this indicates is

<group with operand=1> <composite type> <group with operand=2>

Tom



----------------------
GW Brown, Information Systems and Computing




Archive powered by MHonArc 2.6.16.

Top of Page