Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to use concat in the XSL?

$
0
0

This is my 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>

i need to make concat(grouping) with sub nodes of all'<AvailableProduct>'

something like '1001|BLACK|PRODUCT NAME ONE|1|PRODUCT NAME TWO|2'

How i do in the <xsl:key

<xsl:keyname="ServiceByGroup"match="ServiceProduct"use="concat(ProductInfo/ProductCode,'|',ProductType,'|',AvailableProduct/ProductName,'|',AvailableProduct/ProductID)"/>

Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>