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

后端 未结 2 451
生来不讨喜
生来不讨喜 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:22

    Here is how I would do that:

    
        
          
          

    Update: I forgot to add 1 to the expression (classic off-by-one error)

    Well, starts-with is from XSLT 1.0. Prooflink: the first search result in Google yields XSLT 1.0: function starts-with

提交回复
热议问题