38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<?xml version="1.0"?>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<xsl:stylesheet version="1.0"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync xmlns:exsl="http://exslt.org/common"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync extension-element-prefixes="exsl"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync exclude-result-prefixes="exsl">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:import href="/site.xsl"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="href_base">../</xsl:variable>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="menu_name">Examples Menu</xsl:variable>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="toc">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <form action="/search.php"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync enctype="application/x-www-form-urlencoded" method="get">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <input name="query" type="text" size="20" value=""/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <input name="submit" type="submit" value="Search ..."/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </form>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <ul><!-- style="margin-left: -1em" -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="{$href_base}index.html">Home</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a style="font-weight:bold"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="{$href_base}docs.html">Developer Menu</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a style="font-weight:bold"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync href="{$href_base}html/index.html">API Menu</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="/examples/sections/section">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:variable>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="include">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="header" select="substring-before(substring-after(., '/'), '&gt;')"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="doc" select="concat('/html/libxml-', $header, 'tml')"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><a href="{$doc}"><xsl:value-of select="."/></a></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="typedef">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="name" select="@name"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="header" select="concat(@file, '.h')"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="doc" select="concat('/html/libxml-', @file, '.html#', $name)"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="function">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="name" select="@name"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="header" select="concat(@file, '.h')"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="doc" select="concat('/html/libxml-', @file, '.html#', $name)"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="macro">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="name" select="@name"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="header" select="concat(@file, '.h')"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="doc" select="concat('/html/libxml-', @file, '.html#', $name)"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="example">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="filename" select="string(@filename)"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p><xsl:value-of select="purpose"/></p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Includes:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="includes/include">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:apply-templates select='.'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Uses:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="uses/*">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:sort select="@line" data-type="number"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:apply-templates select='.'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Usage:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p><xsl:value-of select="usage"/></p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p>Author: <xsl:value-of select="author"/></p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="section">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li><p> <a href="#{@name}"><xsl:value-of select="@name"/></a> :</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="example">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:sort select='.'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="filename" select="@filename"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <li> <a href="#{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="/examples/example[@filename = $filename]/synopsis"/></li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </li>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="sections">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p> The examples are stored per section depending on the main focus
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync of the example:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="section">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:sort select='.'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:apply-templates select='.'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </ul>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p> Getting the compilation options and libraries dependancies needed
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncto generate binaries from the examples is best done on Linux/Unix by using
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncthe xml2-config script which should have been installed as part of <i>make
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsyncinstall</i> step or when installing the libxml2 development package:</p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template name="sections-list">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="sections/section">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="section" select="@name"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <h2> <a name="{$section}"></a><xsl:value-of select="$section"/> Examples</h2>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:apply-templates select='/examples/example[section = $section]'/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:for-each>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:template match="examples">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:variable name="title">Libxml2 set of examples</xsl:variable>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:document href="index.html" method="xml" encoding="ISO-8859-1"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <html>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <head>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:call-template name="style"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:element name="title">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:value-of select="$title"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:element>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </head>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:call-template name="titlebox">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:with-param name="title" select="$title"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:call-template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td bgcolor="#8b7765">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <table border="0" cellspacing="0" cellpadding="2" width="100%">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td valign="top" width="200" bgcolor="#8b7765">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:call-template name="toc"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td valign="top" bgcolor="#8b7765">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <table border="0" cellspacing="0" cellpadding="1" width="100%">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <table border="0" cellpadding="3" cellspacing="1" width="100%">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <td bgcolor="#fffacd">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:apply-templates select="sections"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:call-template name="sections-list"/>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <p><a href="/bugs.html">Daniel Veillard</a></p>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </table>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </table>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </table>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </table>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </td>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </tr>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </table>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </body>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </html>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:document>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync </xsl:template>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync</xsl:stylesheet>