How can I delete (or exclude) the first three letters and last four letters of the “admissionDescription” XML string using XSL?
<xsl:if test="cost | admissionDescription">
<dt>Admission:</dt>
<dd>
<xsl:if test="cost"><xsl:value-of select="cost"/><br/></xsl:if>
<xsl:if test="admissionDescription"><xsl:value-of select="admissionDescription" disable-output-escaping="yes"/></xsl:if>
</dd>
</xsl:if>
You can use the XPath functions
substringandstring-length. Here is a simple reference http://www.w3schools.com/xpath/xpath_functions.asp#stringUpdate
You don’t need the
fnprefix. Here is an exampleGiven this test input
Applying your XSL
you get the desired output