Mercurial > hg > Aquinas
comparison summa/latin/wrap.xsl @ 39:13a814a86d4b
first (whole question) wrap
| author | ht |
|---|---|
| date | Tue, 15 Dec 2009 22:35:55 +0000 |
| parents | |
| children | 4cf1125af332 |
comparison
equal
deleted
inserted
replaced
| 38:5a1629cc1e49 | 39:13a814a86d4b |
|---|---|
| 1 <?xml version='1.0'?> | |
| 2 <!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" > | |
| 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:x="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x"> | |
| 4 <!-- Convert a Corpus Thomisticum Latin file into one with true divs, | |
| 5 replacing existing divs with h2/h3 --> | |
| 6 <xsl:template match="node()|@*"> | |
| 7 <xsl:copy> | |
| 8 <xsl:apply-templates select="node()|@*"/> | |
| 9 </xsl:copy> | |
| 10 </xsl:template> | |
| 11 | |
| 12 <xsl:template match="x:body"> | |
| 13 <xsl:copy> | |
| 14 <xsl:apply-templates select="x:a|x:div[@class='tres' or @class='uno' or @class='dos']|x:div[@class='centro'][1]"/> | |
| 15 <xsl:for-each-group select="x:p|x:div[not(@class='tres' or @class='uno' or @class='dos' or @class='centro')]" group-starting-with="x:div[@class='D']"> | |
| 16 <xsl:variable name="n" select="substring-after(.,'Quaestio ')"/> | |
| 17 <div class="q" id="q{$n}"> | |
| 18 <h2><xsl:apply-templates/></h2> | |
| 19 <xsl:apply-templates select="current-group()[position()>1]"/> | |
| 20 </div> | |
| 21 </xsl:for-each-group> | |
| 22 <xsl:apply-templates select="x:div[@class='centro'][2]"/> | |
| 23 </xsl:copy> | |
| 24 </xsl:template> | |
| 25 </xsl:stylesheet> |
