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

RE: How to ??

  • From: keshlam@u...
  • To: xml-dev@i...
  • Date: Tue, 16 Mar 1999 22:23:16 -0500

RE: How to ??
In the DOM world, default attribute values should show up automatically as
attributes of the elements they apply to. The Attr.isSpecified() method can be
used to distinguish between a default and an explicitly entered attribute. Note
that even if an explicit value is the same as the default, it is considered
Specified. Note too that unless you use a validating parser, the whole concept
of default attributes is moot.

Complication: DOM Level 1 defined that behavior but did not define where the DTD
information to support it should be stored. There are many parts of the DTD
behavior that were deferred in Level 1, in the hope that schemas would shape up
quickly enough that Level 2 could easily support both DTDs and schemas...
unfortunately that doesn't seem to be happening. So for now, the DOM really
doesn't provide a good API for working with DTDs, and parsers and applications
have to either accept those limits or fall back on nonstandard interfaces that
may vanish in later versions of the code.

In the case of IBM's parser, both versions of the DOM (TXDocument and
DocumentImpl) can support default attributes. DocumentImpl is pretty much a
strict Level 1 DOM for now, and they may have decided not to attempt to set
default attributes as a result. The TXDocument implementation is somewhat
heavily loaded with non-DOM behaviors, and among those is a set of custom
classes that provide a bit more DTD support (but may bear no resemblance to how
DTDs are handled in future versions of the DOM).

Welcome to the bleeding edge. Wear your crash helmet.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.



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/ and on CD-ROM/ISBN 981-02-3594-1
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.