<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE xsl:stylesheet [ 
  <!ENTITY nbsp "&#160;"> 
  <!ENTITY mdash "&#8212;">
]>

<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
   xmlns:saxon="http://icl.com/saxon"
   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:ink-r="org.inkscape.xslt.files"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
   exclude-result-prefixes="saxon ink-r xsl date sodipodi xlink inkscape"
   extension-element-prefixes="saxon ink-r date"
>

<xsl:output
   method="xml"
   encoding="utf-8"
   indent="yes"
   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
   omit-xml-declaration="yes"
   saxon:omit-meta-tag="yes"/>

<xsl:param name="ill-path"/>
<xsl:param name="ink-path"/>

<!-- page skeleton -->
<xsl:template match="/">
<xsl:comment> DO NOT EDIT THIS FILE. It is produced automatically from a DocBook source (*.xml) by tutorial-html.xsl. </xsl:comment>
<html>
<head><title>Inkscape tutorial: <xsl:value-of select="book/chapter/title"/></title>
<link rel="stylesheet" href="../tutorial-html.css" media="screen" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>

<div id="container">
<div id="header"><h1>
<a href="http://inkscape.org/">Inkscape</a> <span id="tut">tutorial:</span> <span id="tut-title"><xsl:value-of select="book/chapter/title"/></span>
</h1></div>

<!-- body content -->
<div id="content">
<xsl:apply-templates/>
</div>

<!-- footer -->
<div id="footer">
Converted from DocBook source by tutorial-html.xsl. Last update: <xsl:value-of select="date:to-string(date:new())"/>
</div>
</div>

</body>
</html>
</xsl:template>

<xsl:template match="chapter/title"/>

<xsl:template match="author">
<xsl:comment>Author: <xsl:value-of select="."/></xsl:comment>
</xsl:template>

<xsl:template match="sect1/title">
<h2><xsl:apply-templates/></h2>
</xsl:template>

<xsl:template match="sect2/title">
<h3><xsl:apply-templates/></h3>
</xsl:template>

<xsl:template match="para">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="abstract">
<div id="intro"><xsl:apply-templates/></div>
</xsl:template>

<xsl:template match="itemizedlist">
<ul><xsl:apply-templates/></ul>
</xsl:template>

<xsl:template match="listitem">
<li><xsl:apply-templates/></li>
</xsl:template>

<xsl:template match="keycap">
<kbd><xsl:apply-templates/></kbd>
</xsl:template>

<xsl:template match="command">
<span class="menu-command"><xsl:apply-templates/></span>
</xsl:template>

<xsl:template match="ulink">
<a href="{@url}"><xsl:apply-templates/></a>
</xsl:template>

<xsl:template match="emphasis">
<em><xsl:apply-templates/></em>
</xsl:template>

<xsl:template match="firstterm">
<span class="firstterm"><xsl:apply-templates/></span>
</xsl:template>

<xsl:template match="figure">
<xsl:variable name="current-h"><xsl:value-of select="ink-r:run(concat($ink-path, ' ', $ill-path, mediaobject/imageobject/imagedata/@fileref, ' --export-area-drawing --export-dpi=180 --export-png ', $ill-path, mediaobject/imageobject/imagedata/@fileref, '.png'))"/></xsl:variable>

<img src="{concat(mediaobject/imageobject/imagedata/@fileref, '.png')}" alt="An example image" />
</xsl:template>

</xsl:stylesheet>

