I have a xml that looks like below
<xsl:template match="//xml">
<xsl:for-each select="//z:row">
<ul class ="cstm-quicklinks">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="@ows_urlwmenu" />
</xsl:attribute>
<xsl:value-of select="@ows_Title0"/>
</a>
</li>
</ul>
</xsl:for-each>
</xsl:template>
It did not give me the value of @ows_urlwmenu. Because the o/p of that attribute returns the value as:
ows_urlwmenu=”http://www.google.com, http://www.google.com”
The reason for two same Urls is because one is the description and the other is the actual link. I want the Url that is a clickable link, which opens a site.
How would I do that? Thanks in adv.
If there are only two values (one comma), then
substring-after()will suffice (to select the second link):If I misinterpreted your question, and it’s the first of the two links that you want, then
substring-before().I hope this helps,