How can I grab the namespace values associated with this schema element? I've tried many different ways but nothing works. I can't use copy/copy-of for this since it messes up other things I have to do.
Example WSDL: All I want are the wsdl and soapenc namespaces.
Subject:Grabbing sub-namespace values Author:Alberto Massari Date:06 Nov 2008 03:35 AM
the prefix used in the WSDL you are processing is not important, what you really need is the namespace that prefix is mapped to.
So, writing in your XSLT
(after having associated "xsd" to the XML Schema namespace in the xsl:stylesheet element) is enough to match either s:schema or a:schema.
As for what you are trying to extract: in XSLT 1.0 you can use the "namespace" axis to retrieve the namespace nodes that are in scope at a specified level, including the one defined there and the one inherited from the parent node. In XSLT 2.0 you can use the in-scope-prefixes() function.