Subject: [xsl] Associating namespace prefix with namespace URI From: "Iain W Fergusson" <fergusson_iain@xxxxxxxxxxxx> Date: Thu, 17 May 2001 14:06:06 +0100 |
Is there any way to pick up which namespace URI is associated with a particular namespace prefix? I am trying to process WSDL file(s). For example : <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="wsdlTargetNameSpace" xmlns:tns="wsdlTargetNameSpace" xmlns:sns="schemaNameSpace" > ... <import namespace="schemaNameSpace" location="schema.xsd"/> ... <message name="message1"> <part name="body" type="sns:messageBody"/> </message> ... <portType name="PortType1"> <operation name="find"> <input message="tns:message1"/> ... </operation> ... </portType> <binding name="SoapBinding1" type="tns:PortType1"> ... Starting at the binding, I need to drill down to the portType and then the message. The binding has a type="tns:PortType1". To drill down, I need to know if "tns:" is the targetNamespace for the file I'm working on. If so, I can find PortType1 in the current file. If not, I need to find the <import> statement for the correct namespace, and look for PortType1 in that. The problem is that there is no <tns:*> element in the input file, so I can't find such an element and use namespace-uri(). I have a solution of sorts. A first pass over the WSDL file can produce a file with <tns:PortType1> <tns:message1> etc. Then I can use document() and namespace-uri() to get the information I need in a second pass. This works if there is only one level of <import> in the WSDL file, but breaks down if the binding, portType and message are all in different files. Thanks and regards, Iain Fergusson JP Morgan European Technology Centre This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of J.P. Morgan Chase & Co., its subsidiaries and affiliates. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] question about position(), Oliver Becker | Thread | Re: [xsl] Associating namespace pre, Oliver Becker |
[xsl] question about position(), Denis Kranjcec | Date | Re: [xsl] XSL to generate XPaths, Michael Strasser |
Month |