RE: keyrefs from list type (ala IDREFS)

> From: noah_mendelsohn@us.ibm.com 
> 
> Michael's answer is correct as far as I know.
> Perhaps a little bit of perspective might be useful:
<snip>

That was very helpful. Thanks so much for the response.

I can see how it would be difficult--and, to some degree, pointless--for
the schema spec to allow the validation of arbitrary data formats like
the terse SVG path data attribute. A schema should surely not be used to
mark up a document with a single xml-element whose contents are
well-structured non-xml text.

It does seem a little odd that the spec 'halfway' supports lists.
(Though I prefer what it does allow over having no support for lists. :)
I suppose the confusion is that the W3C doesn't seem to have decided if
list attribute types are semantic enough or not. The XML DTD spec seems
to say, "Yes, specifically for the IDREFS type." The XML Schema spec
seems to say, "Maybe. Everyone uses them, so we'll let you mark them up,
but using them for cross-referencing...well, that's just crazy."

I do understand the historical WG perspective. However, I want to make
sure that from a author's perspective, the end result is that the XML
Schema allows gobs more power than DTDs, including the ability to impose
some very powerful validating structure on some seriously terse non-XML
data formats...but at the same time fails to provide support for a basic
form of terse 1-to-many referencing that was available in DTDs.

I previously had decided that tradeoffs between verbose-but-very-clear
schema and terse-but-processor-specific schema was something every
author had to make for themselves. However, with the increasing
popularity of BinXML-type conversions from a schema to a binary XML
format (and not just gzip-compressed like SVG allows), I wonder if
perhaps the most explicit, verbose schema is now the best choice in
general. (Under the possibly flawed assumption that a clearer schema
allows the production of a binary at least as tight as one with chunks
of application-specific data.)

Since I have control over my particular XML format, and a company may be
producing a binary representation from it, I can certainly go with the
verbose 1-to-many referencing that the schema allows. (Or, as Noah
mentions, I can use the list-style reference and just not have the
schema able to ensure the validity of the reference.)

I'm not trying to argue with the chosen perspective. Just providing my
own perspective. I would personally have rather had full-support for the
terse common case rather than half support for the expression of terse
arbitrary patterns.

Received on Monday, 17 April 2006 15:21:46 UTC