[xsl] Sorting a TEI list of biblFull with the date as descendant of the author element

Subject: [xsl] Sorting a TEI list of biblFull with the date as descendant of the author element
From: chiara@xxxxxxxxxxx
Date: Fri, 28 Mar 2014 13:57:53 +0000
I am using Oxygen and XSLT 2.0.
My TEI/XML file is a succession of biblFull elements, which needs to be sorted
via the attribute of the date element descendant of the author element. I
should add that there are more then one element with the same author name and
attribute n and with the same date and attributes.
I think I realise that I need to sort select with the attribute of the date
element, but at the moment I am struggling to figure out which element I need
to sort, the biblFull or the titleStmt?
            <div type="bibliography">
                        <title xml:id="b56">La Priparation
Ivangilique/Preparatio Evangelica</title>
                        <author n="Eusebius">Eusebius Theologus et Scriptor
Ecclesiasticus<date when="0004">A.D. 4</date></author>
                        <editor>Iduard des Places, s.j.</editor>
                        <publisher>Les Idition du Cerf</publisher>
                        <address><addrLine>29, Bd de Latour
                        <availability><p>Copyright 1980, Les Idition du
                        <title>Sources Chritiennes</title>
I only managed to create a sort with this XSLT, but I do not sort the entire
biblFull, only the date and the author
<xsl:template match="/">

                <link rel="stylesheet" type="text/css" href="finale.css"/>
            <body bgcolor="azure">
                <div id="centeredmenu">
                        <a href="Odyssey finale.html" target="_self">Home</a>
                        <a href="Bibliography secondary sources.html"
                            Tradition Bibliography</a>
                        <a href="scholialista.html"
                        <a href="ManuscriptsBookI.html"
target="_self">Manuscripts Book I</a>
                        <a href="#GeneralIntroduction">General
                        <a href="#Dowmnloads">Downloads</a>
                        <a href="#Contacts">Contacts</a>
                    <xsl:value-of select="div[@bibliography]"/>
                    <xsl:apply-templates select="descendant::author[@n]">

select="descendant::author[substring-after(@n, '#')]"/>
                        <xsl:sort select=" substring-after(@n, '#')"/>


                <div class="single">
                    <iframe src="single authors.html" name="single"
height="600" width="500"
The last thing I tried to do is to sort inside a biblFull, but I did not
manage to achieve anything.
<xsl:template match="biblFull">
        <table border="0">
            <xsl:for-each select="descendant::titleStmt">
                <xsl:apply-templates select="descendant::title[@xml:id]"/>
                <xsl:apply-templates select="descendant::title[@sameAs]"/>
                <xsl:apply-templates select="descendant::author[@n]">
                    <xsl:sort select="descendant::date[substring-after(@when,
                    <xsl:sort select="descendant::date[substring-after(@cert,
select="descendant::date[substring-after(@instant, '#')]"/>
select="descendant::date[substring-after(@notAfter, '#')]"/>
select="descendant::date[substring-after(@notBefore, '#')]"/>
                <xsl:apply-templates select="descendant::editor"/>
            <xsl:for-each select="publicationStmt">
                    <xsl:apply-templates select="publisher"/>
                    <xsl:apply-templates select="pubPlace"/>
                    <xsl:apply-templates select="address"/>
                    <xsl:apply-templates select="date"/>
                    <xsl:apply-templates select="availability"/>
            <xsl:for-each select="seriesStmt">
                <xsl:apply-templates select="title"/>
                <xsl:apply-templates select="biblScope"/>
Chiara Salvagni

Current Thread