这是我的xml
<XMLResponse>
<ServiceProduct>
<ProductInfo><ProductCode>1001</ProductCode></ProductInfo>
<ProductType>BLACK</BoardType>
<AvailableProduct>
<ProductID>1</ProductID>
<ProductName>PRODUCT NAME ONE</ProductName>
</AvailableProduct>
<AvailableProduct>
<ProductID>2</ProductID>
<ProductName>PRODUCT NAME TWO</ProductName>
</AvailableProduct>
</ServiceProduct>
<ServiceProduct>
<ProductInfo><ProductCode>1001</ProductCode></ProductInfo>
<ProductType>BLACK</BoardType>
<AvailableProduct>
<ProductID>1</ProductID>
<ProductName>PRODUCT NAME ONE</ProductName>
</AvailableProduct>
<AvailableProduct>
<ProductID>2</ProductID>
<ProductName>PRODUCT NAME TWO</ProductName>
</AvailableProduct>
</ServiceProduct>
<ServiceProduct>
<ProductInfo><ProductCode>1001</ProductCode></ProductInfo>
<ProductType>BLACK</BoardType>
<AvailableProduct>
<ProductID>1</ProductID>
<ProductName>PRODUCT NAME ONE</ProductName>
</AvailableProduct>
<AvailableProduct>
<ProductID>3</ProductID>
<ProductName>PRODUCT NAME THREE</ProductName>
</AvailableProduct>
</ServiceProduct>
<ServiceProduct>
<ProductInfo><ProductCode>1002</ProductCode></ProductInfo>
<ProductType>BLACK</BoardType>
<AvailableProduct>
<ProductID>1</ProductID>
<ProductName>PRODUCT NAME ONE</ProductName>
</AvailableProduct>
<AvailableProduct>
<ProductID>2</ProductID>
<ProductName>PRODUCT NAME TWO</ProductName>
</AvailableProduct>
</ServiceProduct>
</XMLResponse>
我需要对所有concat
'<AvailableProduct>'
(分组)
类似'1001|BLACK|PRODUCT NAME ONE|1|PRODUCT NAME TWO|2
'
我如何处理<xsl:key
<xsl:key name="ServiceByGroup" match="ServiceProduct" use="concat(ProductInfo/ProductCode,'|',ProductType,'|',AvailableProduct/ProductName,'|',AvailableProduct/ProductID)"/>