Re: DOM Level2 Tests

> I work with Mary Brady at NIST and have been
> running the NIST DOM Level 2 tests through
> SUN's MSV tool and have some questions.
>
> Several tests such as documentcreateattributexmlnsillegalname.xml
> and documentcreateelementxmlnsillegalname.xml
> have failed because a double quote is used as element content
> for one of the member nodes. A "unexpected character literal"
> error is returned.

The regular expression pattern for stringLiteral in dom-to-xsd.xsl had been
"[^"]*", requiring that any string literal start with a quote, have no
interior quotes and have no interior quotes.   It is now "([^"]|\\")*" which
allows you to have  \" in the interior.

>
>  I've tried several different ways
> to escape the double quote and haven't had any luck.  Can
> someone give me a suggestion.
>
> Also the namednodemapsetnameditemxmlnsreplaceitem.xml test

The consensus of the group was that overly expressive test names were a
nuisance and new tests should use simple mixed case names based on the
method under test (or a general capability like EventPropagation) and a
numeric identifier, so this test could be called SetNamedItem01.xml.  The
text matrix generated from the metadata provides sufficient information to
browse the tests by description.   Changing the existing DOM L1 names in the
CVS repository was too much of a nuisance to try to fix, so we were going to
live with them.  See
http://lists.w3.org/Archives/Public/www-dom-ts/2001Sep/0011.html and other
messages in August and September.

> uses an underscore in the values of attributes(ex. ret_node).  MSV returns
> "attribute "name" has a bad value: the value does not match the
> regular expression "[A-Za-z] [A-Za-z0-9]*".
>
> Since Java variable names are valid if they contain underscores shouldn't
> they also be valid for the tests.

The schema is definitely trying to subset the capabilities, not to reproduce
the full capabilities, of any one language.  There are two options here,
either we can add underscore the the regular expression (if anyone knows a
language that doesn't allow underscores in variable names, speak up) or you
could change your variable names to conform to the current regular
expression.  Since underscores in member names are contrary to Java's style
guides, I think it would be better to rename your variables to "retNode" for
example.

Received on Wednesday, 17 October 2001 11:08:18 UTC