Can you define a custom collation using a function in XSLT?
问题 I'd like to define an ordering on strings used in a certain element. For example, <class>Senior</class> <class>Junior</class> <class>Sophomore</class> <class>Freshman<class> would describe a reasonable ordering on class. Is there a way using <xsl:sort select='class'> that would sort by the ordering given above? Thanks in advance. 回答1: Have you looked into Saxon's custom collation extensions? For example, <xsl:variable name="rules" select="'< Freshman < Sophomore < Junior < Senior'" /> This