[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Namespaces, W3C XML Schema (was Re: ANN: SAX FiltersforNamespaceProc

  • From: Elliotte Rusty Harold <elharo@m...>
  • To: Xml-Dev <xml-dev@l...>
  • Date: Wed, 22 Aug 2001 11:28:37 -0400

validating namespaces with xml schema
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@m... | 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/     |
+----------------------------------+---------------------------------+

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.