Processer.writeXdmValue includes all ns's
Please register to reply
Added by Anonymous over 15 years ago
Legacy ID: #6987312 Legacy Poster: David Lee (daldei)
In Processor public void writeXdmValue(XdmValue value, Destination destination) Serializes unused namespaces. For example if I create a document <a:x xmlns:a="http://a.com"><foo>bar</foo></a:x> then do an xquery //foo Then use Processor.writeXdmValue the result in text is <foo xmlns:a="http://a.com">bar</foo> Instead of what I would expect <foo>bar</foo> This is due to this line in writeXdmValue tree.append((Item)item.getUnderlyingValue(), 0, NodeInfo.ALL_NAMESPACES); If I write my own version of this method using instead tree.append((Item)item.getUnderlyingValue(), 0, NodeInfo.LOCAL_NAMESPACES); Then the result is as I expected. I'm not sure if this is a bug or 'as designed' -David
Please register to reply