Mercurial > hg > Aquinas
comparison summa/bilingual/merge.xsl @ 65:036ea6d3e18b
switch to list of latin files
| author | ht |
|---|---|
| date | Sun, 03 Jan 2010 17:17:16 +0000 |
| parents | bfebbcb9ddf1 |
| children | 734a1915d5e2 |
comparison
equal
deleted
inserted
replaced
| 64:11682db9b870 | 65:036ea6d3e18b |
|---|---|
| 2 <!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" > | 2 <!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" > |
| 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" exclude-result-prefixes="x" xmlns:x="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"> | 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" exclude-result-prefixes="x" xmlns:x="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | 4 |
| 5 <!-- Merge wrapped latin and prepped english to produce two-column | 5 <!-- Merge wrapped latin and prepped english to produce two-column |
| 6 bilingual for a single Summa Question --> | 6 bilingual for a single Summa Question --> |
| 7 <xsl:param name="lf">xyzzy</xsl:param> | 7 <xsl:param name="lfs">xyzzy</xsl:param><!-- names of latin files --> |
| 8 <xsl:variable name="latin" select="document($lf,/)/*"/> | 8 <xsl:variable name="latin" select="for $lf in tokenize($lfs,';') return document($lf,/)/*"/> |
| 9 <xsl:key name="lq" match="x:div[@class='q']" use="@id"/> | 9 <xsl:key name="lq" match="x:div[@class='q']" use="@id"/> |
| 10 <xsl:variable name="di" select="/x:div/@id"/> | 10 <xsl:variable name="di" select="/x:div/@id"/> |
| 11 <xsl:variable name="qi" select="concat('q',substring-after($di,'_Q'))"/> | 11 <xsl:variable name="qi" select="concat('q',substring-after($di,'_Q'))"/> |
| 12 <xsl:variable name="la" select="key('lq',$qi,$latin)"/> | 12 <xsl:variable name="la" select="for $ld in $latin return key('lq',$qi,$ld)"/> |
| 13 | 13 |
| 14 <xsl:template match="node()|@*"> | 14 <xsl:template match="node()|@*"> |
| 15 <xsl:copy> | 15 <xsl:copy> |
| 16 <xsl:apply-templates select="node()|@*"/> | 16 <xsl:apply-templates select="node()|@*"/> |
| 17 </xsl:copy> | 17 </xsl:copy> |
