mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
- configure.in tests/Makefile.am tests/XSLTMark/* tests/multiple: added the XSLTMark in the regression tests as well as multiple output test from Ankh - libxslt/functions.c libxslt/keys.c libxslt/transform.c libxslt/variables.c libxslt/xsltutils.c: applied William M. Brack patches and fixed a memory leak - tests/docbook/result/html/*.html : updated the results after William's patch - tests/xmlspec/REC-xml-20001006-review.html tests/xmlspec/REC-xml-20001006.html: libxml now don't invent an HTML doctype when serializing HTML result, but adds the encoding in ALT Daniel
56 lines
2.2 KiB
XML
56 lines
2.2 KiB
XML
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
|
|
<xsl:template match="table">
|
|
<document>
|
|
<!-- select * from table where id = ... -->
|
|
<xsl:apply-templates select="row[id=3]"/>
|
|
<xsl:apply-templates select="row[id=13]"/>
|
|
<xsl:apply-templates select="row[id=23]"/>
|
|
<xsl:apply-templates select="row[id=33]"/>
|
|
<xsl:apply-templates select="row[id=43]"/>
|
|
<xsl:apply-templates select="row[id=53]"/>
|
|
<xsl:apply-templates select="row[id=63]"/>
|
|
<xsl:apply-templates select="row[id=73]"/>
|
|
<xsl:apply-templates select="row[id=83]"/>
|
|
<xsl:apply-templates select="row[id=93]"/>
|
|
<!-- select * from table where id > ... and id < ... -->
|
|
<xsl:apply-templates select="row[id>4 and id<8]"/>
|
|
<xsl:apply-templates select="row[id>14 and id<18]"/>
|
|
<xsl:apply-templates select="row[id>24 and id<28]"/>
|
|
<xsl:apply-templates select="row[id>34 and id<38]"/>
|
|
<xsl:apply-templates select="row[id>44 and id<48]"/>
|
|
<xsl:apply-templates select="row[id>54 and id<58]"/>
|
|
<xsl:apply-templates select="row[id>64 and id<68]"/>
|
|
<xsl:apply-templates select="row[id>74 and id<78]"/>
|
|
<xsl:apply-templates select="row[id>84 and id<88]"/>
|
|
<xsl:apply-templates select="row[id>94 and id<98]"/>
|
|
<!-- select * from table where firstname = 'Bob' -->
|
|
<xsl:apply-templates select="row[firstname='Bob']"/>
|
|
<!-- select firstname, lastname from table where id=... -->
|
|
<xsl:for-each select="row[id mod 10 = 9]">
|
|
<xsl:apply-templates select="firstname"/>
|
|
<xsl:apply-templates select="lastname"/>
|
|
</xsl:for-each>
|
|
</document>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="row">
|
|
<xsl:apply-templates select="id"/>
|
|
<xsl:apply-templates select="firstname"/>
|
|
<xsl:apply-templates select="lastname"/>
|
|
<xsl:apply-templates select="street"/>
|
|
<xsl:apply-templates select="city"/>
|
|
<xsl:apply-templates select="state"/>
|
|
<xsl:apply-templates select="zip"/>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="id|firstname|lastname|street|city|state|zip">
|
|
<xsl:value-of select="name(.)"/>
|
|
<xsl:text>=</xsl:text>
|
|
<xsl:value-of select="."/>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|