OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespaces, W3C XML Schema (was Re: ANN: SAX FiltersforNamespaceProcessing)



At 10:25 PM -0700 8/21/01, Ronald Bourret wrote:
>Elliotte Rusty Harold wrote:
>
>> I am concerned that the theoretical use of schemas for typing is
>> overriding their practical use for constraint checking.
>
>The use isn't theoretical. Witness all the products that generate
>classes from XML Schemas.
>

And witness all the people using these products NOT. I classify this stuff along with tree-based XML editors and binary variants of XML as something that gets reinvented several times a month without any actual market demand. 

On the other hand, over the last three years as I've taught developers about DTDs, almost invariably the first question is "How do I say that an element contains an int?" and the second question is usually ""How do I say that an element contains a year since 1969?" or some variant thereof. 

>> Very few people
>> are actually using schemas for typing. Instead they're being used for
>> validation.
>
>I think it depends on how you do the counting. Clearly, the number of
>people validating schemas outnumbers the number of people writing code
>that explores them. This is a restatement of the fact that the number of
>document authors is greater than the number of programmers.
>
>If you count applications, validators are a minority.

I count people as worth more than programs. 

>
>> In validation, we need local types (if not necessarily unqualified
>> local types) because the W3C XML Schema Language confuses the two
>> separate issues of typing and constraints checking, especially when
>> it comes to complex types. I don't want to see any prohibition on
>> local types enshrined as a best practice, or otherwise deprecated.
>
>Could you explain this further? Isn't constraints checking either (a)
>the checking of data against types, or (b) the definition of domains for
>a given type? (I suppose this also depends on what you mean by "type".)
>

If you view restrictions as subclasses, then you can do it all as typing. However, this is problematic in a lot of the naive approaches people are taking. For instance, what's an appropriate subclass of int in Java or C++? For just one recent example, consider this statement from this thread:

"Local types may be used to specify elements with the same name but
different types in different content models. Use of this feature makes
it simpler to write complex schemas which will be processed by
schema-specific processors. However it may also make it harder to
process the data with general purpose processors such as presentation or
editing tools.

Why would local types make life harder for general purpose processors? If a presentation or editing tool is presented with a local restriction of a type, why can't it work with that? If it can't work with that, why can't it use an editor for the base type?  
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      | 
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+