W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Wish List (was Re: Inconsistent Validation - mixed content and group)

From: Winchel 'Todd' Vincent III <winchel@mindspring.com>
Date: Wed, 29 May 2002 22:35:16 -0400
Message-ID: <006e01c20782$a8356650$d05c8990@wtviiilt02>
To: "Biron,Paul V" <Paul.V.Biron@kp.org>
Cc: <xmlschema-dev@w3.org>

<snip/>

> > However, since the <text/> pattern is allowed anywhere it does mean that
> > you
> > can decide where in the mixed content your character data should appear.
> >
> Yup, that's a useful capability...I'm hoping we can get that into XML
Schema
> v1.1 (or at least in v2).

I'm not sure how related this is, but since you are mentioning wish lists .
. . there are three things I would like to be able to do that I can't do (or
don't know how to do) now (or not very well):

1. Wildcard for enumerations -- I would like to be able to specify a list of
enumerations, but also specify a wildcard, so valid content would be any
content that matches the base type.  For example, "White", "Black", "Brown",
"*" where base="xsd:string" and * let's me add any value I want.
Additionally, it would be really, really good if there were a simple way to
set an attribute (something like "Preserve Case") on this construct so that
the wildcard values would *not* validate if they were variations of the
enumerations that varied only by upper/lower case.  For example, if the
"Preserve Case" attribute were set to "true" and enumerations where:

White
Black
Brown
*

Then, the following would be in/valid:

White (valid) (enumeration)
Black (valid) (enumeration)
Brown (valid) (enumeration)
Yellow (valid) (wildcard)
white (invalid) (case conflicts with enumeration)
black (invalid)  (case conflicts with enumeration)
BLACK (invalid)  (case conflicts with enumeration)
aslkdjfaowie (valid) (wildcard)


2. Suppose I have a date or time that requires punctuation or some other
characters in very specific places:

<Hour>12</Hour>:<Minute>30</Minute>

<Month>January</Month> <Day>12</Day>th, <Year>2002</Year>

I would like to be able to enforce the colon between hour and minute and the
"th" and the "," after <Day>.

I could mark-up the punctuation, but that seems overly verbose and does not
fit all the situations I've run into.

I think what I'm after is a regular expression that would not simply
describe a string of characters but that would describe a string of
characters that could include/enforce mark-up.

3. Layering a hierarchy on top of a hierarchy.  SGML was before my time.  My
understanding is that you can layer a hierarchy on top of a hierarchy in
SGML.  If my understanding is correct (and it may not be), this was possible
because one had control over what characters were used for markup (e.g, < >
or <% .. %>), which makes sense to me because, otherwise, I don't see how
you could parse apart one hierarchy from another.  So, this may not be a
schema issue, but an XML issue, and might not be fixable in a schema,
without deviating from well-formed XML.  If my understanding of this issue
is correct, then the irony is that to sell mark-up to the masses, XML took
some of the complications out of SGML (which I think is a good thing), now
that we (I) have XML, I want some of the complications of SGML.

That's my wish list anyway.

Todd
Received on Wednesday, 29 May 2002 22:38:16 UTC

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