This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 429 - transforms updates
Summary: transforms updates
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: Process (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-15 11:44 UTC by Bob Clary
Modified: 2003-12-16 16:51 UTC (History)
0 users

See Also:


Attachments
patch v1 (8.99 KB, patch)
2003-12-15 11:44 UTC, Bob Clary
Details
Changed implementation of JUnitTestCaseAdapter.assertEquals(double (806 bytes, patch)
2003-12-15 14:03 UTC, Curt Arnold
Details
Accepted test-matrix and test-to-jsunit changes, alternative DTD and schema changes (8.81 KB, patch)
2003-12-15 16:36 UTC, Curt Arnold
Details
Additional patch - cast literals before adding to List (3.30 KB, patch)
2003-12-15 19:03 UTC, Bob Clary
Details
Example test XPathResult_resultType.xml using a List of shorts (6.34 KB, text/plain)
2003-12-15 19:05 UTC, Bob Clary
Details
Example test XPathResult_TYPE_ERR.xml using a List of shorts (16.00 KB, text/plain)
2003-12-15 19:13 UTC, Bob Clary
Details
Add support for-each member variables of value types for test-to-java.xsl (3.41 KB, patch)
2003-12-16 00:35 UTC, Curt Arnold
Details

Description Bob Clary 2003-12-15 11:44:10 UTC
1. dom-to-dtd.xsl 

   should allow comments anywhere in the test function body.

   I need to keep a list of ints in a List and iterate over the values. To
   do this, I added a subtype attribute to <var> which allows the proper 
   casting of the items from a List to ints.

2. text-matrix.xsl

   missing {} in attribute value template for $featureURI <a>

3. test-to-java.xsl

   add subtype processing to <var>

4. test-to-jsunit.xsl

   fix leading comma problem in version lists
Comment 1 Bob Clary 2003-12-15 11:44:38 UTC
Created attachment 101 [details]
patch v1
Comment 2 Bob Clary 2003-12-15 11:46:14 UTC
in dom-to-dtd.xsl, I also added double to the list of types. Left that out of
the original comment. Sorry for the bug spam.
Comment 3 Curt Arnold 2003-12-15 14:03:50 UTC
Created attachment 104 [details]
Changed implementation of JUnitTestCaseAdapter.assertEquals(double
Comment 4 Curt Arnold 2003-12-15 14:07:38 UTC
Comment on attachment 104 [details]
Changed implementation of JUnitTestCaseAdapter.assertEquals(double

Attached to wrong bug, belonged to 428.
Comment 5 Curt Arnold 2003-12-15 16:35:20 UTC
The change to the DTD allowing comment elements to appear everywhere violated 
unambiguous particle attribution constraint.  Please use XML comments to 
comment elements outside the body of the test.

I'd like to review the tests that motivated the subtype attribute.  I added an 
optional type attribute to the member element that allows you to specify the 
type of a member of the element (without that attribute the value is used to 
determine the type) that may address your requirements.

That is,

<var name="shortList" type="List">
   <member type="short">17</member>
</var>

If there is a compelling need for type specific lists, I'd prefer the 
attribute to be named memberType instead of subtype.

I also added support for double literals to the schema.

I accepted the changes to test-matrix.xsl and test-to-jsunit.xsl.
Comment 6 Curt Arnold 2003-12-15 16:36:35 UTC
Created attachment 106 [details]
Accepted test-matrix and test-to-jsunit changes, alternative DTD and schema changes
Comment 7 Bob Clary 2003-12-15 19:03:31 UTC
Created attachment 107 [details]
Additional patch - cast literals before adding to List

I reverted and applied your patch. I still have a couple of issues though.

eg:

1)    nodeTypeList.add(new Short(7));
2)    inNodeType = (short) nodeTypeList.get(indexd118e113);

I can fix 1) by applying the attached patch. I am not sure how to fix 2)
though. I would need to look up the member's type attribute and do something
like:

inNodeType = (short) ((Short)nodeTypeList.get(indexd118e113).shortValue());

I will attach an example test which uses this.
Comment 8 Bob Clary 2003-12-15 19:05:31 UTC
Created attachment 108 [details]
Example test XPathResult_resultType.xml using a List of shorts
Comment 9 Bob Clary 2003-12-15 19:13:13 UTC
Created attachment 109 [details]
Example test XPathResult_TYPE_ERR.xml using a List of shorts
Comment 10 Curt Arnold 2003-12-16 00:35:51 UTC
Created attachment 111 [details]
Add support for-each member variables of value types for test-to-java.xsl
Comment 11 Bob Clary 2003-12-16 06:47:34 UTC
These changes work for me. I think you can mark this fixed.