[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 Filters forNamespacePro

  • From: "Fuchs, Matthew" <matthew.fuchs@c...>
  • To: 'Elliotte Rusty Harold' <elharo@m...>,Xml-Dev <xml-dev@l...>
  • Date: Thu, 23 Aug 2001 12:44:29 -0700

sax namespace binding


> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo@m...]
> Sent: Wednesday, August 22, 2001 3:56 PM
> To: Michael Brennan; Xml-Dev
> Subject: RE: Namespaces, W3C XML Schema (was Re: ANN: SAX Filters
> forNames paceProcessing)
> 
> 
> At 1:42 PM -0700 8/22/01, Michael Brennan wrote:
> 
> 
> >> 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. 
> >
> >In other words, people want data-binding, but they want it 
> to be simple.
> >
> 
> No, this isn't data binding at all. It's validation. It's 
> being presented with a set of quantities and verifying that 
> those quantities meet certain predetermined constraints. 
> 
> For example, suppose somebody sends me a SOAP request which 
> among other things contains a SocialSecurity element whose 
> text is supposed to be a social security number. I may want 
> to verify that this number contains exactly 11 digits and two 
> hyphens before I stick it in my database using JDBC and a 
> String variable. This is perfectly reasonable and useful 
> thing to do. It in no way requires that I define a 
> SocialSecurity class or an ElevenDigitString class or 
> anything else that isn't a normal, every day part of Java. 
> You may want to do create these classes, and you're free to 
> do so, but this is in no way the only way to use schemas. 
> 
> Following the same approach, a complex schema might define 
> 100s of types. I might pull all of those types into my 
> programs from XML documents as the single Java type String. I 
> might then turn around and stuff them all in a SQL database 
> as INT, DATE, CHAR[32], and maybe a dozen other standard SQL types. 

Or you may choose to exploit using schema types as types and directly
specify the type mappings from schema types to SQL types and not have to
write all that munging code.

Matthew

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.