library tests

I managed to finish the library code and tests today, but not the 
documentation.

The tests are found at:
http://www.w3.org/2001/sw/grddl-wg/td/pendinglist

Please note:
a) the new library code passes inline-rdf7 which it didn't use to, so 
I've included that in the pendinglist

b) the first few tests in that document are the ones to illustrate the 
proposed change from XPath Nodeset to Document - these are not intended 
for the GRDDL Tests editor's draft

c) three of the library tests are informative, because they cover cases 
that the library module for base URIs cannot handle, and the transform 
terminates abnormally. These are clearly separated.


====

Further XSLT question, some of the logic in the new code requires 
comparing element nodes for identity. I've coded this up as:

   <xsl:variable name="base-node-and-ancestor-base-node-are-the-same"
      select="count($base-node/ancestor-or-self::*) =
                count($ancestor-base-node/ancestor-or-self::*)
             and
             count($base-node/preceding::*) =
                count($ancestor-base-node/preceding::*)" />

and later I use the boolean 
$base-node-and-ancestor-base-node-are-the-same in some test.

The count(.) stuff looks a bit odd to me, is there an easier way to tell 
if two nodes are identical: '=' is clearly not it.
At this point in the code, I know that $base-node and 
$ancestor-base-node are both nodesets, either containing a single 
element node, or empty.

(There is an extensive comment in the code, explaining why I want to 
know whether they are identical or not
http://www.w3.org/2003/g/xml-attributes
)

I don't think I'll get to complete the documentation before Monday.

Jeremy

PS I was amused by the Funtional programming in XSLT paper, but haven't 
gone there!





-- 
Hewlett-Packard Limited
registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

Received on Thursday, 21 June 2007 21:18:37 UTC