Sherif Abdelzaher
Sherif Abdelzaher

Reputation: 23

Convert repeating node to a comma delimited using XSLT

I'm new to XSLT and I need help with my question:

I have repeating node in an XML and I would like to convert the repeating node to a comma delimited string using XSLT. and if there is an N/A in one of the repeating nodes, ignore it and fetch the other nodes

<Studios>
  <Studio>Hollywood</CustName>
  <Studio>Santa Monica</CustName>
  <Studio>N/A</CustName>
</Studios>

Expected result should be:

Hollywood, Santa Monica

Thanks in advance.

Upvotes: 1

Views: 152

Answers (1)

michael.hor257k
michael.hor257k

Reputation: 117102

I'm stuck with ignoring if its N/A.

<xsl:for-each select="Studio[not(.='N/A')]">

Upvotes: 1

Related Questions