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

Re: createElement

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Thu, 5 Oct 2000 11:32:30 -0400
To: "Jamshed Ahsan" <ahsanjamshed@rediffmail.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <OFDC9807F4.E49EC680-ON8525696F.0053DD8C@pok.ibm.com>

Default attributes are attribute values specified in the DTD, which will
appear on the element unless the user explicitly specifies another value
for those attributes.  For example, according to the XHTML and HTML4 DTDs,
the <button> element's type attribute has the default value "submit". If
you just write
     <button>
in your document, the resulting Element Node should automatically be given
an Attr with the name "type", the value "submit", and the unspecified flag
set to true.

If the DTD doesn't specify a default value for the Attr, there isn't a
default Attr node.

If you don't have a DTD to consult (eg, if you used a nonvalidating XML
parser and your document's internal subset doesn't specify a default for
this attribute), there isn't a default Attr node.

______________________________________
Joe Kesselman  / IBM Research
Received on Thursday, 5 October 2000 11:32:40 GMT

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