[relaxng-user] trang and xsd-friendly schemas

Bob Foster bob at objfac.com
Mon Sep 13 10:20:08 ICT 2004


Sebastian Rahtz wrote:
 > sometimes I wonder what the point of interleave is. if you want x, y 
and z,
 > but don't care about the order, why not specify an order?

Yes, for DTD/XSD, where element order is significant, they are usually 
specified as unordered, e.g., (a|b)*, but where element order is 
unimportant, they are usually specified as ordered, e.g., (a,b). (I 
think of this as Cowan's Rule.)

However, the former case may be too loose (allow more occurrences than 
are semantically meaningful), while the latter is overly restrictive. 
Interleave can help in both those circumstances.

 >> or even something equivalent and
 >> xsd/dtd-friendly such as (x,((y,z?)|(z,y?))|y,((x,z?)|(z,x?))... etc
 >>
 > thats not technically manageable over a certain number of elements,
 > surely?

Surely.

Bob Foster

 > Sebastian



More information about the relaxng-user mailing list