I would like to have a list sorted ignoring any initial definite/indefinite articles 'the' and 'a'. For instance:
- The Comedy of Errors
- Hamlet
- A Midsummer Night's Dream
- Twelfth Night
- The Winter's Tale
I think perhaps in XSLT 2.0 this could be achieved along the lines of:
<xsl:template match="/">
<xsl:for-each select="play"/>
<xsl:sort select="if (starts-with(title, 'A ')) then substring(title, 2) else
if (starts-with(title, 'The ')) then substring(title, 4) else title"/>
<p><xsl:value-of select="title"/></p>
</xsl:for-each>
</xsl:template>
However, I want to use in-browser processing, so have to use XSLT 1.0. Is there any way to achieve this in XLST 1.0?