W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Attribute have Multi-values?

From: Mike Olson <Mike.Olson@FourThought.com>
Date: Fri, 06 Nov 1998 01:25:07 -0500
Message-ID: <36429642.1E2CFEC5@FourThought.com>
To: www-dom@w3.org


DaeHoon Zee wrote:

> Thanks a lot for your reply.
> Let me ask a little more.
> 1. Is it possible a Attribute have 'value', 'Text', 'Entity Reference' simultaneously ?
>     And How it is represented by XML as a text?
> 2. Is it possible a Attribute have several 'Text' Nodes or 'Entity Reference' Nodes?
>    And How these multi-values can be represented by XML as a text?
>

This is how I understand it...

The following tag:
<INPUT TYPE='TEXT' VALUE='something &lt something else'>

Would be the following core DOM tree.

An Element with a nodeName of INPUT
The element would have 2 Attr nodes in its attributes NameNodeMap
The first has a name of TYPE.  It has one child 'Text' Node.  The value of this Attr would
be 'TYPE'
The second has a name of VALUE.  It has three children.
    The first child is a Text Node for 'something '
    The second child is a EntityReference for the &lt
    The third child is a 'Text' Node for ' something else'

However, I have a question about the second attr.

Should its value attribute return 'something &lt something else' or should it return
'something < something else' ?

Mike Olson
FourThought LLC
http://www.fourthought.com
Received on Friday, 6 November 1998 01:24:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT