Hello basically i am woundering if it would be possible to reference one XSLT from another.
In terms of code this is that i mean. Below is the code full code that i want to use:
Code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="time_generated"></xsl:param>
<xsl:template match="/getDeliveryPdfResponse">
<response>
<header>
<xsl:choose>
<xsl:when test="rcode = 0">
<status>200</status>
</xsl:when>
<xsl:when test="rcode = 1">
<status>201</status>
</xsl:when>
<xsl:when test="rcode = 2">
<status>202</status>
</xsl:when>
<xsl:when test="rcode = 3">
<status>203</status>
</xsl:when>
<xsl:when test="rcode = 4">
<status>204</status>
</xsl:when>
<xsl:when test="rcode = 5">
<status>205</status>
</xsl:when>
<xsl:when test="rcode = 6">
<status>206</status>
</xsl:when>
<xsl:when test="rcode = 7">
<status>207</status>
</xsl:when>
<xsl:when test="rcode = 8">
<status>208</status>
</xsl:when>
<xsl:when test="rcode = 9">
<status>209</status>
</xsl:when>
</xsl:choose>
<message_detail><xsl:value-of select="rmessage"></xsl:value-of></message_detail>
<apikey_detail>
<class/>
<rate-limit-remaining/>
<rate-limit-reset/>
</apikey_detail>
</header>
<data>
<xsl:copy-of select="payload/node()"/>
</data>
</response>
</xsl:template>
</xsl:stylesheet>
However this chunk
Code:
<xsl:choose>
<xsl:when test="rcode = 0">
<status>200</status>
</xsl:when>
<xsl:when test="rcode = 1">
<status>201</status>
</xsl:when>
<xsl:when test="rcode = 2">
<status>202</status>
</xsl:when>
<xsl:when test="rcode = 3">
<status>203</status>
</xsl:when>
<xsl:when test="rcode = 4">
<status>204</status>
</xsl:when>
<xsl:when test="rcode = 5">
<status>205</status>
</xsl:when>
<xsl:when test="rcode = 6">
<status>206</status>
</xsl:when>
<xsl:when test="rcode = 7">
<status>207</status>
</xsl:when>
<xsl:when test="rcode = 8">
<status>208</status>
</xsl:when>
<xsl:when test="rcode = 9">
<status>209</status>
</xsl:when>
</xsl:choose>
I want to source from another external XSLT so that i can use it in many different XSLT and therefore if i ever want to update a status code i only have to change one XSLT not the 100's that we have.
Is this possible?
Many Thanks