W3C home > Mailing lists > Public > www-dom-ts@w3.org > August 2002

Re: need help, level 3 test

From: Curt Arnold <carnold@houston.rr.com>
Date: Mon, 12 Aug 2002 04:19:09 -0500
Message-ID: <003201c241e1$50c21960$a800a8c0@CurtMicron>
To: <www-dom-ts@w3.org>

There was no transform in test-to-java.xsl for overriden property accessors.
I've committed changes to test-to-java.xsl that will now take:

<whatToShow>
    <return value="&SHOW_ELEMENT;"/>
</whatToShow>

and produce

class ... implements DOMFilterBuilder {
...
   public long getWhatToShow() {
        return 1;
   }
}

I've committed a modified version of your test as tests/level3/ls/test1.xml
and added a "dom3-ls-javac" target to build.xml.

> I'd also like to know how you can refer to constants defined in other
> interfaces,e.g. NodeFilter.SHOW_ELEMENT.

What you were doing to make FILTER_REJECT and FILTER_ACCEPT visible
exploited too much knowledge of how DOMTSML tests were translated to Java
and would not allow us to generate other language bindings.  Symbolic
constants, if needed, should be done via entity expansion (as shown in my
modification of your test) or expressed as literals (as in all the existing
core tests that check that nodeValue is 1 or 3 or whatever).

If we want to make tests like assert(NodeFilter.SHOW_ELEMENT,1) then we will
need to add some specific test construct that will properly handle the lack
of these constants in JavaScript.  Those should be separate tests than
testing the implementation which should be independent of whether
NodeFilter.SHOW_ELEMENT returns the specified value.


----- Original Message -----
From: "Jeroen van Rotterdam" <jvrdam@xs4all.nl>
To: <www-dom-ts@w3.org>
Sent: Sunday, August 11, 2002 6:43 AM
Subject: need help, level 3 test


> Attached is a filter test which generated test1.java if you leave out the
> <whatToShow...> element.
> Can someone have a look at this and tell me how you would have to specify
> <whatToShow> in this case (I've been staring on it a while now) ?
> I'd also like to know how you can refer to constants defined in other
> interfaces,e.g. NodeFilter.SHOW_ELEMENT.
> Thanks in advance,
>
> Jeroen
> =====
> X-Hive Corporation
> Jeroen van Rotterdam, CEO
> e-mail: jeroen@x-hive.com
> phone: +31 10 7108600
> http://www.x-hive.com
>
>
>
>
Received on Monday, 12 August 2002 05:19:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:05 UTC