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

Re: Unspecified #IMPLIED attributes in Java (was: Goals: XML ...)

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev@i...
  • Date: Thu, 18 Dec 1997 19:07:03

java p
At 16:32 18/12/97 +0000, Toby Speight wrote:
>Peter> Peter Murray-Rust <URL:mailto:peter@u...>
>
>> In article <3.0.1.16.19971218152122.29672990@p...>,
>> Peter wrote:
>
>Peter> Is it the question of the return value of a non-existent
>Peter> attribute.  IOW what does
>Peter>
>Peter> <!ATTLIST FOO PLUGH CDATA #IMPLIED>
>Peter>
>Peter> <FOO BAR="baz" XYZZY="" BLORT="six      spaces"/>
>Peter>
>Peter> return for
>Peter> String s = element.getAttval("PLUGH");// could be "", or null
>
>David has answered the original question (what is isSpecified() for in the
>Java simple API?), but I thought I'd mention that DSSSL's attribute-string
>function returns #f for PLUGH; the Java equivalent of this is of course,
>null.  I think this is the Right Thing to do; it's sometimes important to
>tell the difference between <Fu bargh=""/> and <Fu/>.

I agree that it is the Right Thing to do. If everyone else agrees it is the
Right Thing to do I will be very happy.  If 10% agrees and the other 90%
don't know what we are on about, we need to make sure they can't Go Wrong :-)


>
>The first case is often used to mean a known, empty value; the second
>to mean "not known" or "not applicable".
>
>Concrete example: I'm a rock climber, and I keep a record of all my
>climbing in XML format.  Climbs are defined as

How exciting - I used to be (not a very good one).

[...]
>
>climbs.xml>  <climb grade="VD" stars="" style="2"
>climbs.xml>   with="&p-hkm;">Difficult Crack</climb>
>
>Here, the lack of stars is explicit - it's not a high-quality climb.
>Whereas
>
>climbs.xml> <climb grade="D" with="&p-ejk;, &p-dmj;"
>climbs.xml>  style="l">King's Chimney</climb>
>
>is a climb in a part of Britain where the star system isn't used, and
>so I omitted the attribute - even though it probably deserves a star
>or two.

Not according to MacInnes' star system; he gives it zero stars :-).
Seriously, if we adopt this system then we should make every effort to
promote it. One difficult area is in editors - how do you signal the
difference between 
"" and null when entering a value in a box? You either have to get them to
input NULL (yukk) or add another button for "IMPLIED" (Ugh).

I'd like some other expert opinion on this. It's a tricky area if we get it
wrong.

	P.

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg

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.