XML:
<param name="SomeName">
<path>'root.domain.sub1.sub2.sub3.subover9000'</path>
</param>
The root.domain. is a static value, sub1.sub2.sub3.subover9000 is a dynamic value. Where I want to select the sub2 value as output.
My XSLTv1:
<xsl:variable name="Sysid" select="//@name[normalize-space(.) = 'SomeName']/parent::*"/>
<xsl:variable name="SSafter" select="substring-after( $Sysid, 'root.domain.')"/>
<xsl:variable name="SSbefore" select="substring-before( $SSafter, '.sub3.subover9000')"/>
<xsl:value-of select="$SSbefore"/>
Output:
sub1.sub2
The problem is - I cannot renounce sub1. because its dynamic in different XML files, but I only need sub2.
So how can I say to ignore part between root.domain. and next dot"."?
The rule says:
The expression fn:substring-after("abcdefghi", "--d-e-", "http://www.w3.org/2013/collation/UCA?lang=en;alternate=blanked;strength=primary") returns "fghi".
Which in my view means, when I use:
<xsl:variable name="SSafter" select="substring-after( $Sysid, '--root.domain.-.-')"/>
I should get sub2 as output, but I don't.