>with the following code I get a NullPointerException with Saxon 9.6.0.7 and >wonder why
A NullPointerException in Saxon code is always going to be a product bug, so it's best to report it directly at http://saxonica.plan.io/ I haven't tried running with 9.6.0.7, but on 9.6.0.9 and 9.7 the query runs successfully. So it's probably a bug that was fixed, though I can't immediately identify it. Alternatively, it's something specific to the way in which you are running the query, in which case we will need more details. Please try it on a later maintenance release, and if the problem still occurs, report it at http://saxonica.plan.io/, explaining exactly how you were running the query. Michael Kay Saxonica _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk