次のような SOAP リクエストがあります。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetCountriesResponse xmlns="url">
<GetCountriesResult>
<ExtendedOptionItem>
<Value>GB</Value>
<Description>United Kingdom</Description>
<Active>true</Active>
<IsDefault>true</IsDefault>
<Order>0</Order>
</ExtendedOptionItem>
<ExtendedOptionItem>
<Value>GB</Value>
<Description>United Kingdom</Description>
<Active>true</Active>
<IsDefault>true</IsDefault>
<Order>0</Order>
</ExtendedOptionItem>
</GetCountriesResult>
</GetCountriesResponse>
</soap:Body>
</soap:Envelope>
現時点で私の XSLT は、具体的には「説明」ノードを対象としています。私がやりたいのは、各「ExtendedOptionItem」の説明を引き出すことです。
各説明をセミコロンで区切る必要がある XSLT をいくつか作成しました。
この XSLT は、"ExtendedOptionItem" が 1 つしかない場合に問題なく機能します。ただし、複数の項目がある場合、XML は変換されません。
私の XSLT を見直して、どこが間違っているのか評価していただけないでしょうか。
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" omit-xml-declaration="no" encoding="utf-8" indent="yes" />
<xsl:template match="/">
<xsl:for-each xmlns:n="url" select="n:ExtendedOptionItem">
<xsl:value-of select="n:Description" />;</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
どうもありがとう
アップデート;
SOAP 応答は、ワークフロー エンジンによって次のように変更されます。
<ExtendedOptionItem xmlns="url"><Value>GB</Value><Description>United Kingdom</Description><Active>true</Active><IsDefault>true</IsDefault><Order>0</Order></ExtendedOptionItem><ExtendedOptionItem xmlns="url"><Value>AF</Value><Description>Afghanistan</Description><Active>true</Active><IsDefault>false</IsDefault><Order>0</Order></ExtendedOptionItem><ExtendedOptionItem xmlns="url"><Value>AX</Value><Description>Åland Islands</Description><Active>true</Active><IsDefault>false</IsDefault><Order>0</Order></ExtendedOptionItem>