- From: Natan Cox <natan.cox@gmail.com>
- Date: Fri, 8 Jan 2010 08:34:37 +0100
- To: xproc-dev@w3.org
- Message-ID: <28f8eb9d1001072334i2437df1eg19345f661bc72b3c@mail.gmail.com>
Hi Norman,
I was having some trouble getting a certain XProc step to work. Mainly my
fault because I did something like
<p:xquery >
<p:input port="query">
<p:inline>
<html> <body> <ul> ... query here ... </ul> </body>
</html>
</p:inline>
</p:input>
<p:input port="parameters" sequence="true">
<p:empty/>
</p:input>
</p:xquery>
forgetting c:query in the p:inline.
I get a NullPointerException on node.getBaseURI()
S9apiUtils.writeXdmValue(runtime, nodes, dest,
node.getBaseURI());
It would easier for me if in ReadableInline you would add after
// Find the document element so we can get the base URI
XdmNode node = null;
for (int pos = 0; pos < nodes.size() && node == null; pos++) {
if (((XdmNode) nodes.get(pos)).getNodeKind() ==
XdmNodeKind.ELEMENT) {
node = (XdmNode) nodes.get(pos);
}
}
another null check on node and report a nice contextualized message of what
I did wrong.
Thanks, Natan
Received on Friday, 8 January 2010 17:15:39 UTC