xsl-list
[Top] [All Lists]

RE: [xsl] Confusing trace from Saxon HE9

2009-12-09 05:26:36
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
optimizing.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>