Re: Freely nested elements in Schema

Hi,
Do any of you know an elegant way in XML Schema to
declare elements or types, such that empty or paired
tags may appear "freely" in an instance doc? What I
want to do is similar to HTML except, of course, that
tags cannot overlap (viz, "<A> <B> </A> </B>").

To clarify, let's say that the containing element
is delimited by the tags <BODY></BODY>, its type is
"mixed", and an instance doc is free to nest
inside it the tags <B></B>, <FONT></FONT>, and
<IMG/> in any order. Then, in an instance doc one
might write:

"<BODY>The <FONT><B>quick</B> brown fox<IMG/></FONT>
jumped</IMG> over the lazy
<B><FONT>dog</FONT>.</B></BODY>"

I expect the solution likely is in using a recursive
Type definition, possibly simplified by using a
substitution group.

Your advice and an example or reference would be
much appreciated!
Thanks,
- Louis

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

Received on Wednesday, 28 January 2004 21:39:58 UTC