Upgraded to Xalan 2.7.1 and JDK 6.0 Update 13, still no luck :(
Any suggestions?
Adrian.
Adrian Herscu wrote:
Hi all,
I am using Xalan 2.7.0. I am writing a large XSL application which
processes WSDL files. Because of the nature of WSDL files, this
processing requires a complex loop declaration just to traverse a
reference. Right now, the code looks like this:
<!-- key for looking up the wsdl:binding -->
<variable name="binding-key">
<apply-templates select="." mode="binding-key" />
</variable>
<for-each select="key('binding',$binding-key)">
...
</for-each>
Imagine few nested loops like the one above...
Hence, I want to simplify the code to look like:
<for-each select="myxslutils:ref(/wsdl:definitions/wsdl:binding,
'name', @binding, /wsdl:definitions/@targetNamespace)">
...
</for-each>
Somewhere in my extension function I need to extract the namespace URI
of a given prefix. I tried the node.lookupNamespaceURI(prefix) method
but it returns with a null value :( Tried it on the root element also
and got the same result. Tried to enumerate the attributes of the root
element and the namespace attributes are not returned -- any clues?
The WSDL document is read using this method:
transformer.transform(new StreamSource(reader),
new StreamResult(writer));
where reader is a java.io.FileReader.
It seems like the namespace declarations are missing from the parse
tree. OTH, the transformations depend on these namespace declarations
and they work as expected.
Please help,
Adrian.