Bug #1675
closedTransforming parentless element on .NET
100%
Description
From Max Toro maxtoroq@gmail.com on the Saxon help list:
I'm using Saxon-HE 9.4.0.6 for .NET
I'm having trouble with a transformation that uses a root element node
(doesn't have a parent document node) as initial context node. I get a
NullReferenceException on Saxon.Api.XsltTransformer.Run(XmlDestination
destination), looking with reflector I suspect the issue might be with
one of these lines:
DocumentInfo doc = this.initialContextNode.getDocumentRoot();
this.controller.registerDocument(doc, (doc.getBaseURI() ==
null) ? null : new DocumentURI(doc.getBaseURI()));
I think it's trying to get the root node as a document node, which it
isn't. This element node is constructed in an XSLT transformation,
passed as argument to an integrated extension function which uses it
as initial context node in a new transformation, which is the one that
fails.
Besides the NullReferenceException, does XSLT allow you to start a
transformation with a parentless element?
Please register to edit this issue