[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Associating namespace prefix with namespace URI

Subject: Associating namespace prefix with namespace URI
From: "Iain W Fergusson" <fergusson_iain@xxxxxxxxxxxx>
Date: Thu, 17 May 2001 14:06:06 +0100
wsdltargetnamespace
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.