| 1 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udhr="http://www.unhchr.ch/udhr"> |
| 2 |
<!-- --> |
| 3 |
|
| 4 |
<xsl:template match="/"> |
| 5 |
<TeXML> |
| 6 |
<xsl:call-template name="latex-header"/> |
| 7 |
<xsl:apply-templates/> |
| 8 |
</TeXML> |
| 9 |
</xsl:template> |
| 10 |
|
| 11 |
<xsl:template match="*"> |
| 12 |
<xsl:message>*** Unprocessed XML element <xsl:value-of select="local-name()"/></xsl:message> |
| 13 |
</xsl:template> |
| 14 |
|
| 15 |
<xsl:template match="udhr:udhr"> |
| 16 |
<env name="document"> |
| 17 |
<cmd name="UseParaDefault" gr="0" nl2="1" /> |
| 18 |
<xsl:apply-templates/> |
| 19 |
</env> |
| 20 |
</xsl:template> |
| 21 |
|
| 22 |
<xsl:template match="udhr:article | udhr:preamble"> |
| 23 |
<xsl:apply-templates/> |
| 24 |
</xsl:template> |
| 25 |
|
| 26 |
<xsl:template match="udhr:udhr/udhr:title"> |
| 27 |
<cmd name="HeadI" nl2="1"> |
| 28 |
<parm><xsl:apply-templates/></parm> |
| 29 |
</cmd> |
| 30 |
</xsl:template> |
| 31 |
|
| 32 |
<xsl:template match="udhr:preamble/udhr:title | udhr:article/udhr:title"> |
| 33 |
<spec cat="nl?"/> |
| 34 |
<spec cat="comment"/> |
| 35 |
<spec cat="nl"/> |
| 36 |
<cmd name="HeadII" nl2="1"> |
| 37 |
<parm><xsl:apply-templates/></parm> |
| 38 |
</cmd> |
| 39 |
</xsl:template> |
| 40 |
|
| 41 |
<xsl:template match="udhr:para"> |
| 42 |
<env name="para" nl2="0" nl3="0"> |
| 43 |
<xsl:if test="parent::udhr:listitem"> |
| 44 |
<xsl:attribute name="nl1">0</xsl:attribute> |
| 45 |
<xsl:attribute name="nl4">0</xsl:attribute> |
| 46 |
</xsl:if> |
| 47 |
<xsl:apply-templates/> |
| 48 |
</env> |
| 49 |
</xsl:template> |
| 50 |
|
| 51 |
<xsl:template match="udhr:listitem/udhr:para"> |
| 52 |
<xsl:apply-templates/> |
| 53 |
</xsl:template> |
| 54 |
|
| 55 |
<xsl:template match="udhr:orderedlist"> |
| 56 |
<env name="udhrlist"> |
| 57 |
<xsl:apply-templates/> |
| 58 |
</env> |
| 59 |
</xsl:template> |
| 60 |
|
| 61 |
<xsl:template match="udhr:listitem"> |
| 62 |
<cmd name="listitem" nl2="1"> |
| 63 |
<parm><xsl:value-of select="1+count(preceding-sibling::udhr:listitem)"/></parm> |
| 64 |
<parm><xsl:apply-templates select="*"/></parm> |
| 65 |
</cmd> |
| 66 |
</xsl:template> |
| 67 |
|
| 68 |
<xsl:template name="latex-header"> |
| 69 |
<TeXML escape="0" ws="1">\documentclass[a5paper]{article} |
| 70 |
\usepackage{paravesp} |
| 71 |
\usepackage{paras} |
| 72 |
\usepackage[english]{babel} |
| 73 |
\usepackage{hyperref} |
| 74 |
</TeXML> |
| 75 |
</xsl:template> |
| 76 |
|
| 77 |
</xsl:stylesheet> |