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

RE: schemaLocation & Parser support?

  • From: "David E. Cleary" <davec@p...>
  • To: Prashanth Rao <prao@v...>, xml-dev@l...
  • Date: Tue, 14 Aug 2001 16:30:09 -0400

schemalocation
> The last sentence of the above paragraph indicates to me that
> xsi:schemaLocation is an optional feature that parsers can choose to
> implement or not.

Correct. Although I do not know of any parser supporting XML Schema not
supporting this.

> This seems to go against the grain of the design
> philosophy of XML:  "The number of optional features in XML is to
> be kept to
> the absolute minimum, ideally zero."  I know that they are two separate
> specifications, but by relegating xsi:schemaLocation to be an optional
> feature, the specification breeds parser inconsistency, which
> surely can not
> be a good thing.

If you have a server application that processes XML documents, are you
really going to trust the author of the document to provide you the schema
you validate that instance against? For instance, you accept purchase orders
that conform to a vocabulary sprcified by OAG or CommerceOne or what have
you. Your application can handle any XML document that validates against
these schemas. If schemaLocation were not optional, Joe Hacker could send
you an instance that claims to be from one of these vocabularies and tells
you you can get the schema off of some web site in the former Soviet Union.
This schema could be anything and the instance will be valid against it, but
bad things happen to your application. What is the purpose of validating
against a schema if you have no control over where that schema came from?

All the XML Schema compliant parsers I am aware of will use schemaLocation
unless you (the application) override it. This is how it should be. In my
XML world, xsi:schemaLocation is a security risk and I will not use a parser
that doesn't allow me to disable it.

Section 2.4 Schema Structures defines 3 conformance levels for schema
processors. A fully conforming processor must use schemaLocation unless
directed otherwise. Otherwise it can't be called fully conforming.

David Cleary



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.