Hi all,
As a test for something a bit more complex, I am trying to do a simple sort of
names, some of which start with character entity references:
<root>
<author><surname>Öborn</surname></author>
<author><surname>Jones</surname></author>
<author><surname>Edwards</surname></author>
<author><surname>Osgood</surname></author>
<author><surname>Èmeraldo</surname></author>
<author><surname>Smith</surname></author>
</root>
Using this transform:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="ASCII"/>
<xsl:template match="/">
<html>
<body>
<h1>Author List</h1>
<xsl:for-each select="//author">
<xsl:sort select="surname"/>
<p>
<xsl:value-of select="surname"/>
</p>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I want two things, the entities to come out in hex and the sort to treat
characters with diacriticals as equivalent to same characters without
diacriticals. So, e with an acute accent should be sorted equivalently with e
without an acute accent.
Using Oxygen, the sort works as intended when the transformer is Saxon 6.5.5,
but the entities come out as decimal.
<html>
<body>
<h1>Author List</h1>
<p>Edwards</p>
<p>Èmeraldo</p>
<p>Jones</p>
<p>Öborn</p>
<p>Osgood</p>
<p>Smith</p>
</body>
</html>
If I change the transformer to Saxon 9.4.0.4, I get hex, but all the author
names that start with a character entity reference get stuck at the end.
<html>
<body>
<h1>Author List</h1>
<p>Edwards</p>
<p>Jones</p>
<p>Osgood</p>
<p>Smith</p>
<p>Èmeraldo</p>
<p>Öborn</p>
</body>
</html>
Like anyone else, I'd like to have my cake and eat it too. But, how?
Thanks,
Charles
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--