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

RE: Why Doesn't IE5 use the DTD to Validate?

Subject: RE: Why Doesn't IE5 use the DTD to Validate?
From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx>
Date: Wed, 31 Mar 1999 14:02:31 -0800
use dtd to validate xml
This is as designed, not a bug.

The IE5 XML parser is a validating parser, with two properties set through
DOM extensions to control DTD handling:
 - validateOnParse determines whether validation errors are presented to the
user.
 - resolveExternals determines whether the DTD or XML Schema is loaded and
datatypes, default values, etc. are honored.

The values of these properties when browsing directly to XML documents is
validateOnParse=false and resolveExternals=true.

When browsing XML documents on the Web, surfacing validation errors is of
little apparent value.  I would not expect publishers to author both a DTD
or XML Schema and documents that don't conform to that DTD/Schema.  So the
vast majority will not generate validation errors.  For those that declare a
DTD and are invalid, is it no better to give the user a validation error
instead of displaying the document, in fact the validation error could
prevent the user from viewing an otherwise perfectly good document.  Also
the performance penalty for validation is significant and should not be
imposed on end-users without good reason.

The only scenario we could come up with where validation is useful when
browsing XML documents is when the browser is used as a development tool,
allowing easy checking of well-formedness and validation for a document in
progress.  This scenario can be accomplished by a number of alternative
mechanisms without impacting the browsing experience - a simple tool that
validates an XML document could be written in a few lines of JavaScript, see
http://msdn.microsoft.com/downloads/samples/internet/xml/xml_validator/defau
lt.asp for an example.

We considered several mechanisms for allowing developers to "turn on"
validation errors but did not find a clean solution that could be
implemented in time for the IE5 release.

- Jonathan Marsh

> -----Original Message-----
> From: Sall, Ken [mailto:ksall@xxxxxxx]
> Sent: Wednesday, March 31, 1999 6:37 AM
> To: 'xsl-list@xxxxxxxxxxxxxxxx'
> Subject: RE: Why Doesn't IE5 use the DTD to Validate?
> 
> 
> Thanks, Stephen.
> I've added an example that illustrates your point that IE5 detects DTD
> syntax errors.
> 
> http://members.home.com/kensall/tests/collection1bugsdtd.xml
> http://members.home.com/kensall/tests/collection1bugs.dtd
>  
> However, if anyone from Microsoft can explain why IE5 doesn't 
> actually use
> the DTD to validate the document (the way that IE5 Beta 2 did), I'd
> appreciate it. This problem will be published in an article 
> shortly (in the
> larger context of positive things you can do with IE5 with 
> XML/XSL) and it
> would be great to state correctly what Microsoft plans w.r.t. DTD
> processing. 
> 
> TIA
> - Ken Sall                           ksall@xxxxxxx, kensall@xxxxxxxx
> - Century Computing, Inc.            http://www.cen.com/
> - NG-HTML: Next Generation HTML      http://www.cen.com/ng-html/
> - XML at Web Developers Virtual Lib
> http://WDVL.com/Authoring/Languages/XML/
> - MW3: Motif on the World Wide Web   http://www.cen.com/mw3/
> 
> > -----Original Message-----
> > From: Stephen Ransom [mailto:sransom@xxxxxxxxxxxxxxxxx]
> > Sent: Wednesday, March 31, 1999 1:52 AM
> > To: xsl-list@xxxxxxxxxxxxxxxx
> > Subject: Re: Why Doesn't IE5 use the DTD to Validate?
> > 
> > 
> > > It doesn't appear that IE5 (March 18th release) uses the 
> > DTD to validate
> > > XML, as did the IE5 Beta 2 release. Has anyone been able to 
> > make IE5 detect
> > > when a doc doesn't follow the rules of the DTD that it references?
> > 
> > I agree that IE5 appears to "lose" the errors in a well 
> > formed but invalid XML
> > document (ie one written in proper XML but which fails to 
> meet its DTD
> > definition).
> > 
> > I note however that IE5 is aware of the DTD even though it 
> > will pass through a
> > failing XML document. This can be shown by adding a line of 
> > XXXX's into the DTD
> > itself (thus breaking the DTD's well-formedness). IE5 will 
> > give you an error
> > message identifying the XXXX's as incorrect.
> > 
> > Stephen
> > 
> > 
> > 
> >  XSL-List info and archive:  
> http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.