I have a list that should ignore any preliminary fixed / uncertain article 'the' and 'a' for example
I think that in XSLT 2.0, this can be achieved with:
& Lt; Xsl: sort select = "if starts with (title, 'a')) then substring (title, 2) and if (starts with (title, '' '')) then substring (title, 4) and the title "/> & Lt; P & gt; & Lt; Xsl: Select Value = "Title" /> & Lt; / P & gt; & Lt; / XSL: for-each & gt; & Lt; / XSL: Templates & gt;
However, I want to use in-browser processing, so XSLT 1.0 is to be used. Is there a way to achieve this in XLST 1.0?
this change :
& lt; Xsl: template match = "plays" & gt; & Lt; P & gt; Sort by title play: & lt; / P & gt; & Lt; Xsl: each selection = "play" & gt; & Lt; Xsl: Select Sort = "Continit" (Begins with (",", ("A"), or along with 'Start' ('' '')), Substring-After (@title [., 'The']], 'The', Substring-After (@ title [starts (., 'A')], 'A') > & lt; p & gt; & lt; xsl : Select the value = -o-each & gt; & lt; / XSL: Template & gt; & lt; / XSL: / P> When applied to this XML document : generates the desired result
< / P> strong>:
& lt; p & gt; according to the title Affiliate: & lt; / p & gt; & lt; p & gt; Barbers & lt; / p & gt; & lt; p & gt; Comedy of Errors & lt; / p & gt; & lt; p & gt; ; CTA & amp; Fred & lt; / p & gt; & lt; p & gt; Hamlet & lt; / p & gt; & lt; p & gt; A Midasmar Nights Dream & lt; / p & gt; ; L & gt; P & gt; Twelfth Night & lt; / p & gt; & lt; p & gt; Winter Fiction & lt; / p & gt;
Comments
Post a Comment