RE: [xsl] Confusing trace from Saxon HE9

Subject: RE: [xsl] Confusing trace from Saxon HE9
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 9 Dec 2009 10:26:11 -0000
> I will look into the possibility of declaring types for 
> parameters throughout my code. In this particular instance, 
> the $node parameter could be really any element from the 
> source document (but not a sequence)

Then describe it using as="element()". That's quite sufficient to catch this
error early on, and it also shares your knowledge of what the variable is
supposed to contain with the people reading and debugging your code, as well
as sharing it with the compiler, which can make use of the knowledge when


Michael Kay 

Current Thread