0

から (XSLT を使用して) WSDL を変換する必要があります。

<wsdl:definitions 
  targetNamespace="a.b.c/s/Md"
  xmlns:apachesoap="http://xml.apache.org/xml-soap"
  xmlns:impl="a.b.c/s/Md"
  xmlns:intf="a.b.c/s/Md"
  xmlns:tns2="http://lang.java"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 ...
 .
 ..
 .....
 ......       

</wsdl:definitions>

<wsdl:definitions 
  targetNamespace="1.2.3/s/Md"
  xmlns:apachesoap="http://xml.apache.org/xml-soap"
  xmlns:impl="1.2.3/s/Md"
  xmlns:intf="1.2.3/s/Md"
  xmlns:tns2="http://lang.java"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 ...
 .
 ..
 .....
 ......




</wsdl:definitions>

検索と置換でこれを行うことはできますか? 最善の方法は何でしょうか?? copy-of select を試しましたが、うまくいきませんでした。

私は次のことを試しました...

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 xmlns:tns2="http://lang.java" 
 xmlns:intf="1.2.3/s/Md" 
 xmlns:impl="1.2.3/s/Md" 
 xmlns:apachesoap="http://xml.apache.org/xml-soap" 
targetNamespace="1.2.3/s/Md">

<xsl:output omit-xml-declaration="yes" indent="yes"/>

 <xsl:template match="node()|@*">
  <xsl:copy>
   <xsl:apply-templates select="node()|@*"/>
</xsl:copy>
 </xsl:template>

<xsl:template match="/*">
  <xsl:element name="{name()}" namespace="{namespace-uri()}">

  <xsl:copy-of select= "document('')/*/namespace::*[name()='intf']"/>
  <xsl:copy-of select= "document('')/*/namespace::*[name()='impl']"/>
  <xsl:copy-of select="@*"/>

  </xsl:element>
 </xsl:template>
   </xsl:stylesheet>

これは出力には影響しません。

4

0 に答える 0