[
Lists Home |
Date Index |
Thread Index
]
- From: Paul Prescod <papresco@technologist.com>
- To: xml-dev@ic.ac.uk
- Date: Mon, 26 Oct 1998 23:27:18 -0500
Don Park wrote:
>
> String city = address.getAttribute("city")
> String street = address.getAttribute("street")
>
> or even simpler in ECMAScript:
>
> var city = address.city
> var street = address.street
>
> In other words, why not treat attributes as a specific type of child
> element: unique and childless?
Your example elements being treated as a special kind of *attribute*.
(getAttribute(...)). But how do you "attribute-ize" a content model like
this:
<!ELEMENT P (#PCDATA|EMPH|B|I|A)>
What does P.getAttribute( "B" ) return if there are three B s with four I
s between them?
Paul Prescod - http://itrc.uwaterloo.ca/~papresco
Marge: "It's almost as if Snake is killing from beyond the grave."
Lisa: "I warned you that capital punishment wouldn't be a deterrent."
- The Simpson's halloween special: "Hell Toupee"
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|