W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2001

recursive element definition with constraints

From: Baptiste Burgaud <bbu@teamlog.fr>
Date: Thu, 19 Jul 2001 12:48:13 +0200
Message-ID: <008501c11040$4fd67290$0601460a@teamlog.fr>
To: <xmlschema-dev@w3.org>
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?


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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC