I am trying to sorting on text based first text should be upper case then other start with first letter caps or small letter.
Input XML
To sort upper-case letters before lower-case letters, use the case-order
attribute of xsl:sort
.
Here's a simplified example:
XSLT
Result
B.K.B. v Maui Police Dep’t (9th Cir 2002) 276 F3d 1091:
BTS, USA, Inc. v Executive Perspectives, LLC (Conn. Super, Oct. 16, 2014, No. X10CV116010685) 2014 Conn Super Lexis 2644, aff’d (Conn App 2016) 142 A3d 342:
Babcock v Butler County (3d Cir 2015) 806 F3d 153:
Buxbom v Smith (1944) 23 C2d 535:
Byrd v Roadway Express, Inc. (5th Cir 1982) 687 F2d 85:
buySAFE, Inc. v Google, Inc. (Fed Cir 2014) 765 F3d 1350:
I too do not understand what logic you want to implement to get the output you show.
I am able to get the same output by sorting the nodes in the following order:
XSLT 2.0
Demo: https://xsltfiddle.liberty-development.net/a9GPfN