It's not clear to me what you are trying to do here. "getSequence" is a method on a node in the expression tree, and this is not a supported external interface. Saxon can write the expression tree any way it likes; you can look at it if you want, but Saxon offers no guarantees about what you will find there. In a different release, the expression might well be rewritten as

if (//a) then (/element) else ()

I think you need to step back and explain the problem you are trying to solve; perhaps there is a better way of solving it.

Michael Kay
Saxonica

On 25/07/2011 11:43, Denis DEBARBIEUX wrote:
Hi Michael,

1. I compile the following XPath Query: /element[//a]
2. I get an (internal) Expression: let $zz:zz16267615 := lazy(((/)/descendant::a)) return (((/)/child::element)[$zz:zz16267615])
3. On this LetExpression, I call the getSequence method in order to bound the variable.
This method returns lazy(((/)/descendant::a)) while I expect (((/)/child::element)[lazy(((/)/descendant::a))]

Test done with saxon9he.jar.

Could you help me?

Regards,
-- 
Denis Debarbieux
Engineer at INRIA
+33 (0)3.59.57.78.15
Skype: denis.debarbieux 
------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help