Your trying to read the document node instead of the root node.

Insert this code prior to the System.err.prinln()

            XdmSequenceIterator iter = doc.axisIterator(Axis.CHILD);
            doc = (XdmNode);

Works !

doc: <wrapper content-type="application/octet-stream"/>
name: wrapper
attr: application/octet-stream

There is probably a better way but I dont see the equivilent of "GetDocumentRoot()"

David A. Lee

Norman Walsh wrote:
Hi Mike,

If I run the attached code, I get:

doc: <wrapper content-type="application/octet-stream"/>
name: null
attr: null

where name/attr are attempts to get the name and attribute value
of the element that is "doc":

System.err.println("doc: " + doc);
System.err.println("name: " + doc.getNodeName());
System.err.println("attr: " + doc.getAttributeValue(_content_type));

Clearly I'm doing something wrong, but it's not clear what. Not clear
to me, anyway.

However, I did manage to get it down to a pretty simple test case. If
you could take a look and point out where I've gone off the rails, I'd
sure appreciate it.

I'm not sure how this problem has escaped my attention for so long,
but naturally as soon as I started writing pipelines for the Balisage
symposium, everything went pear shaped. :-)


Be seeing you, norm

------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.

_______________________________________________ saxon-help mailing list archived at