I created XSLT using an identity template and several templates that match potential XPath in the source. However, ways of matching do not always exist. Is there a way to βinsertβ the path before applying the matching pattern? Since I know that XSLT is not executed procedurally, I was not sure how to do this. Examples are below.
Let's say this is XSLT:
<xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:if> </xsl:template> <xsl:template match='pathA'> do stuff </xsl:template> <xsl:template match='pathB'> do something </xsl:template> <xsl:template match='pathC'> do other stuff </xsl:template>
And let's say this on the tab:
<root> <Child> <pathA>I have Data!</pathA> <pathC>We skipped B!</pathC> </Child> </root>
Is there a way to βcreateβ pathB so that the XPath matching template can execute?
Thanks again for the help!
source share