W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2003

Re: More comments Level 3 Validation/Edit

From: Benjamin C. Chang <Ben.Chang@oracle.com>
Date: Tue, 27 May 2003 15:05:55 -0700
Message-ID: <3ED3E143.C35E0675@oracle.com>
To: Curt Arnold <carnold@houston.rr.com>
CC: www-dom@w3.org, w3c-dom-wg@w3.org

Responses are below.


Curt Arnold wrote:

> ElementEditVal.allowedChildren isn't all that useful.  What you really
> would want is a list of all the element names (and maybe #text if
> character content would be allowed) that could appear as the initial
> child of the element.  If you had a content model like (j,
> (a|b|c|d|e|f|g|h|i|k|m|n|o|p)) you would want to guide the user to start
> a <j> element.  Once you had that inserted, you could use
> NodeEditVal.allowableNextSiblings to guide through the rest of the
> content model.

allowedChildren is very flexible; subsequent operations would achieve
your desired results.  Your suggestion of having a convenience attribute
(the allowed* are all attributes) allowedFirstChildElements was

> ElementEditVal.allowedAttributes is good, but it would also be helpful
> for have an ElementEditVal.requiredAttributes and maybe an
> ElementEditVal.fixedAttributes.

requiredAttributes was already there; you must have missed it.  We decided
against adding a fixedAttributes attribute for now.

> It would be useful if DocumentEditVal had a method that took a value
> from a NameList from  allowedChildren, allowedNextSiblings, et al and
> created the corresponding node.  The format of the NameList entries is
> not described, but without such a method, it would be necessary to parse
> the entry into the namespace and local name and then call the
> corresponding CreateElement or CreateElementNS.
> Something like:
> Node CreateNode(string nameListName)
> where if nameListName was '@foo', you'd get an attribute, if
> nameListName was #text, you'd get a CharacterDataNode and if
> 'transform:http://www.w3.org/1999/XSL/Transform", an XSLT transform
> element and if "foo" a DOM L1 element.
> That would suggest that allowedAttributes should return the attribute
> values starting with a "@".  You'd also need to specify how you'd
> represent namespace qualified attributes.

If you take a look at the DOM L3 CORE NameList description, these
are not needed.
Received on Tuesday, 27 May 2003 18:07:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC