Re: load on DocumentLS vs framework load

Jeroen van Rotterdam wrote:
> I believe there's a naming conflict between the load element of the test
> suite and the load method of DocumentLS in DOM L3 Load & Save.
> 
> 
> This is what my generated dtd says about load:
> 
> <!ELEMENT load EMPTY>
> <!ATTLIST load
> 	var CDATA #REQUIRED
> 	href CDATA #IMPLIED
>     uri CDATA #IMPLIED
>     obj CDATA #IMPLIED
>     interface (DocumentLS) #IMPLIED
> 	willBeModified (true | false) #REQUIRED
> 
> 
> 
> And here's a part of my test:
> 
>  <assign var="documentls" value="document"/>
>  <load var="result" obj="documentls" uri="TEST1" willBeModified="false"
> interface="DocumentLS"/>
> 
> 
> Which has an attribute willBeModified which is added because it is
> required in the dtd. It should be eliminated.
> 
> Here's the java code generated by the stylesheet:
> 
> 
>     documentls = (DocumentLS)  document;
>     result = load("");
> 
> 
> I assume the stylesheet is looking at the href since it assumes this a
> load by the framework instead of DOM L3-LS.
> 
> 
> Any idea ?

I committed two small changes to test-to-java.xsl and dom-to-dtd.xsl. 
In test-to-java, I changed the test on the template that produces the 
framework load from:

<xsl:template match="*[local-name() = 'load']" mode="body">

to

<xsl:template match="*[local-name() = 'load' and not(@interface)]" 
mode="body">

That should let an DocumentLS load fall through to the DOM method 
generation code.

In dom-to-dtd.xsl, I made willBeModified optional to be consistent with 
the schema.

Please let me know if these adequately address the issue.

Received on Sunday, 2 February 2003 16:47:33 UTC