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

RE: enumeration and defaults

  • From: "Stewart Rubenstein" <sdr@c...>
  • To: "'XML-Dev Mailing list'" <xml-dev@i...>
  • Date: Mon, 13 Sep 1999 17:40:58 -0400

default value for enum
It's important to distinguish between empty-value and not-present.

Empty-value for enumerated types is simply not supported.  You have to use a
value like "none" or "unspecified" and use an extra layer of filtering if
your application requires the empty string for these cases internally.  I'd
like to be able to say
  <!ATTLIST foo ( a | b | c | ) "a"> <!-- default is "a", but "" is also
permitted -->
  <!ATTLIST bar ( a | b | c | ) "">  <!-- default is empty, not
not-present -->
but AFAIK I can't express this in a DTD.  I don't think it's what you were
asking.

However, not-present *is* supported as the default value, that's exactly
what #IMPLIED gets you.  Not-present is not supported as a non-default
value.

I don't know whether Tim was talking about empty-value support or
not-present as a non-default value.  I would find empty-value support
helpful in making my documents and processing more natural, but I can work
around that problem.  I don't see a need for not-present as a non-default
value, myself.

-Stew
CTO, CambridgeSoft Corp
> -----Original Message-----
> My original question:
> http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Sep-1999/0606.html
> (basically, is it legit to use #IMPLIED on the declaration for an
> enumerated attribute type and NOT specify a value in the document.)
>
> At 05:22 PM 9/10/99 -0400, John Cowan wrote:
> http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Sep-1999/0636.html
> (basically, yes. XHTML does it.)
>
> At 02:32 PM 9/10/99 -0700, Tim Bray wrote:
> http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Sep-1999/0609.html
> (basically, no, but it would be nice to see in schemas.)



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.