W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2003

More comments Level 3 Validation/Edit

From: Curt Arnold <carnold@houston.rr.com>
Date: Thu, 13 Feb 2003 00:40:19 -0600
Message-ID: <3E4B3DD3.9000401@houston.rr.com>
To: www-dom@w3.org

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.

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

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.
Received on Thursday, 13 February 2003 01:40:30 UTC

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