recursive element definition with constraints

Hi there,

I'm new to XML-schemas. I sought thought the list archive and found some usefull material but I'm still quite stuck as I'm trying to define some complex schema:

I have a set of atomic types and want the instance document to be any buildup of those types, and this recursively thought the depth of the xml tree, but with the condition that a type can be used only once during recursion (types are exclusive in depth but not in width).

For instance, if I have 4 atomic types I would end with this kind of regular expr:

( ( (a|ag) | (b|bg) | (c|cg) | (d|dg) )*) (instance document xml tree width )
where ag is ( a( (b|abg) | (c|acg) | (d|adg) ) )  (instance document xml tree depth)
and abg is ( ab( (c|abcg) | (d|abdg) ) ) and so on...

hope this is clear enough :o) , I don't know if I should use keyrefs or definine !n groups (n is the numer of atomic types) to express this exclusivity constraint, does anyone has a tip for me?

thxs.

Baptiste.

Received on Thursday, 19 July 2001 06:52:05 UTC