Ignoring 'A' and 'The' when sorting with XSLT

后端 未结 2 424
生来不讨喜
生来不讨喜 2020-12-21 08:29

I would like to have a list sorted ignoring any initial definite/indefinite articles \'the\' and \'a\'. For instance:

  • The Comedy of Errors
  • Hamlet
2条回答
  •  隐瞒了意图╮
    2020-12-21 09:14

    This transformation:

    
     

    Plays sorted by title:

    when applied on this XML document:

    produces the wanted, correct result:

    Plays sorted by title:

    Barber

    The Comedy of Errors

    CTA & Fred

    Hamlet

    A Midsummer Night's Dream

    Twelfth Night

    The Winter's Tale

提交回复
热议问题