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

RE: Namespaces and XML validation

  • From: Charles Frankston <cfranks@m...>
  • To: 'John Cowan' <cowan@l...>, XML Dev <xml-dev@i...>
  • Date: Fri, 7 Aug 1998 23:46:38 -0700

xml fragment validation
John Cowan wrote:
> This is quite separate from locality *as such*; locality of prefixes
> just means that a given prefix isn't legal outside the scope of
> its declaration.  However, following the Algol precedents, you have
> allowed declarations to supersede conflicting outer declarations
> and to coexist with conflicting non-overlapping declarations.
> There is some, if not overwhelming, software engineering experience
> to indicate that this is a Bad Idea.
> 

I find an assertion that "software engineering experience" has shown that
Algol style lexical scoping is a bad idea quite surprising.  Which school of
software engineering believes this?  Certainly not the one I went to.

John --

I think you and some others on this list are being insufficiently
imaginative in tackling the problem of figuring out how to validate
documents that use the namespace spec.  I believe it is possible to do
fragment validation against DTDs, if that is so desired.  However this
certainly cannot be accomplished without some modification of the mechanics
of DTD validation, as Tim outlined.  I.e. pre-processing the DTD and the
instance to convert all names to URI, name pairs, and what some have called
fragment validation using as the root of each fragment any element that
introduces a tag from a new namespace.  A new namespace for this purpose is
defined as one from a different namespace than its parent.

I do not believe the new namespace proposal with local scoping makes it any
harder to do than the old PI based namespace proposal.  It may make it
harder to think about it.  The fact that the namespace prefix may actually
be declared physically in the document after the DOCTYPE doesn't matter.  At
the time when the instance is to be compared to see if it matches the
declaration in the DTD, the prefix to URI mapping is available.  Can you do
this without modifying your validation code?  Certainly not.

However, the approach I've outlined above still has a severe problem, which
I don't think is so easily solved.  In order to do this form of validaton,
what gets put in the DTD is the prefix, and not the URI.  That is a fatal
flaw, because it makes it impossible to re-use a DTD for more than one
document unless all documents that use that DTD use the same prefix for the
same URI.  That elevates the prefix to the same status as the URI --
something one must take care to keep globally unique.  The prefix is not
syntactically suited to this task.

For that reason, and because of other well known deficiencies in DTDs, I
think the issue of validation and namespaces is better dealt with in the
context of a whole new schema language.  The XML-Data submission clearly
showed how this could work.  The new namespace proposal does no violence to
XML-Data's use of namespaces.  I would therefore rather spend my time
working on the new schema language, as the XML WG will shortly be doing,
than patching DTDs.  

(The XSchema work that's been going on in XML-Dev is hopefully equally
adaptable -- the volume of mail is simply too high so I have not been
following it closely.  The key is the use of XML syntax, which enables one
to use namespace declarations in the schema in a manner that mimics the
instance.)



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.