I've the below XML.
<para><page num="42"/><content-style font-style="bold">2/1/4</content-style></para>
Here i'm creating a template and trying to match both the first and second child as below.
<xsl:template match="para[node()[position() = 2 and self::content-style[matches(., '(\w+)/(\w+)')] and (position() = 1 and self::page)]]">
Here when i try it like
<xsl:template match="para[node()[(position() = 1 and self::page)]]">
or
<xsl:template match="para[node()[position() = 2 and self::content-style[matches(., '(\w+)/(\w+)')]]]">
the match is correctly being called, but when i combine as shown in top, it is not working,
I need to perform some tasks based on this match, please let me know where am i going wrong and how to fix this.
Thanks
No comments:
Post a Comment