I am stuck in something that probably for you might think is simple!
In an xml file I have these nodes
<Types>
<Pas type="1" single="Man" plural="Men" />
<Pas type="2" single="Woman" plural="Women" description="this is a test" />
<Pas type="3" single="Child" plural="Children" description="this is another test" />
</Types>
Then in an xslt file a have javascript and I am filling a variable
Details = {<xsl:for-each select="/Types/Pas">"<xsl:value-of select="@type"/>": {single:"<xsl:value-of select="@single"/>",plural:"<xsl:value-of select="@plural"/>"}
So far so good. At some point in the xslt i have this
(<xsl:value-of select="$Details/@desc" />)*
because i want to show the description in () with a * at the end.
And i am getting this:
Men()*
Women(this is a test)*
Children(this is another test)*
The problem is that i dont want the ()* in Men.
Is there any way to exclude it?
Regards!
You could add an xsl:if statement like this: