I’m getting the following XML-element back in an XML file. From this element I need to retrieve the URL information.
<Page SmallImage="" LargeImage="" Icon="" MenuText="Text" MouseOver="" Image=""
ImageActive="" ImageMouseOver="" Allowclick="True" ShowInSitemap="True"
Href="Default.aspx?ID=27&GroupID=GROUP11"
FriendlyHref="/nl-nl/assortiment/group/category/text.aspx" Title="" NavigationTag=""
RelativeLevel="4" Sort="1" LastInLevel="True" ChildCount="0" class="L4" ID="18"
AreaID="1" InPath="False" Active="False" AbsoluteLevel="4"/>
As visible in the example above the attribute ‘Href’ contains an GroupID.
Href="Default.aspx?ID=27&GroupID=GROUP11"
Now I want to concatenate the GROUPID of the URL with the value from the FriendlyHref attribute. Is it possible to get this value using XSLT1.0?
The result I would like to get is;
/nl-nl/assortiment/group/category/text.aspx?Group=GROUP11
I’ve already found this and this topic here on stackoverflow, but these examples didn’t gave me any results at all.
If the
GroupIDis always the last argument of the query string, you can use substring-after() to extract the value. For example: