Import from v. 2.0.2 downloaded from http://getfo.org/texml/
[texml.git] / tests / data / quick / quick.xsl
1 <xsl:stylesheet version="1.0"
2   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output indent="yes"/>
4
5 <!-- document skeleton -->
6 <xsl:template match="/">
7   <TeXML>
8     <cmd name="documentclass">
9       <opt>a4paper,12pt</opt>
10       <parm>article</parm>
11     </cmd>
12     <env name="document">
13       <!-- title page -->
14       <cmd name="author" nl2="1">
15         <parm><xsl:value-of
16             select="//span[@class='author']"/>
17         </parm>
18       </cmd>
19       <cmd name="title" nl2="1">
20         <parm><xsl:value-of
21             select="/html/head/title"/></parm>
22       </cmd>
23       <cmd name="maketitle" nl2="1" gr="0"/>
24       <!-- document body -->
25       <xsl:apply-templates select="/html/body"/>
26     </env>
27   </TeXML>
28 </xsl:template>
29
30 <!-- document body -->
31 <xsl:template match="body">
32   <cmd name="section*" nl2="1">
33     <parm><xsl:value-of select="h1"/></parm>
34   </cmd>
35   <xsl:apply-templates select="*"/>
36 </xsl:template>
37
38 <!-- text -->
39 <xsl:template match="p">
40   <TeXML>
41     <xsl:apply-templates/>
42     <cmd name="par" nl2="1" gr="0"/>
43   </TeXML>
44 </xsl:template>
45
46 <!-- quotes -->
47 <xsl:template match="q">
48   <cmd name="lq"/><cmd name="lq"/>
49   <xsl:apply-templates/>
50   <cmd name="rq"/><cmd name="rq"/>
51 </xsl:template>
52
53 <!-- line -->
54 <xsl:template match="hr">
55   <cmd name="bigskip" gr="0" nl2="1"/>
56   <cmd name="hrule"   gr="0" nl2="1"/>
57 </xsl:template>
58
59 <!-- ignore h1 and author in body -->
60 <xsl:template match="h1 | p[@align]"/>
61
62 </xsl:stylesheet>