[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Constrain the Number of Occurrences of Elements in your X
- To: "Bullard, Claude L \(Len\)" <len.bullard@i...>, "XML Developers List" <xml-dev@l...>
- Subject: RE: Constrain the Number of Occurrences of Elements in your XML Schema
- From: "Chiusano Joseph" <chiusano_joseph@b...>
- Date: Fri, 5 Aug 2005 14:36:22 -0400
- Thread-index: AcWZ7EB6JOp6VsmhTP2KUGKUGDiiAAAADIRA
- Thread-topic: Constrain the Number of Occurrences of Elements in your XML Schema
> Keep a light hand on the
tiller.
And the Rudder.
(sorry, couldn't resist:p)
Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
C: 202-251-0731
Visit us online@ http://www.boozallen.com/
I
agree with Doug. Unless there is clear evidence that a feature is
creating a problem or
will
soon, don't close an extensibility feature. Wildcards, xsd:any,
this sort of construct,
are the real heart of the 'extensibility' of XML. Otherwise,
schemas are just a means to
validate. Even if there is overlap, it sometimes dicey to
turn a validator into a filter.
Sometimes one has to limit the depth of a recursion and when we had the
SGML Declaration,
that
could be specified (support varied but the intent was clear).
Otherwise, I don't think
I'd
go so far as to say 'never use it' because it, like mixed content, proves to
be an organic
property of the data. I don't like to constrain
organic properties to suit the tool. That usually
bites. To put it another way, in a domain of attractors, you
can rely on
strict rules on the limit and fixed types, but the strange ones remain
strange.
Keep
a light hand on the tiller.
len
Personal opinion: Recursive structures can be among the
most valuable structures available in XML, especially with regard to generic
<section> (and similar) elements. Putting a cap on maxOccurs and
adjusting as needed going forward can be a good idea.
Frankly, nothing in your arguments below justify the
statement "don't use recursive constructions." You do make a good argument
for restricting maxOccurs. An awful lot of the discussion is related to
specific "possible" conditions that can lead to problems. It is very
subjective. If recursion is not good for what you do, don't use it. But
telling others that they shouldn't when it is an important, proven part
of their processes just doesn't float. Quite a few major XML players are
proponents of recursive sections, based largely on experience. Of course,
quite a few are of the opposite opinion as well. :-)
I've written XML tips illustrating both potential
strengths and potential pitfalls of recursive sections, but would need time
to rewrite them here (since the online journal I wrote them for owns the
copyright to the exact phrasing of the tips). The point is, the value of
recursion depends largely on what you are trying to
accomplish.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|