This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How dynamic is XSL?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: How dynamic is XSL?
- From: Ben Robb <Ben at cscape dot com>
- Date: Thu, 10 Aug 2000 18:34:03 +0100
- Reply-To: xsl-list at mulberrytech dot com
Try:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <!-- root of XML document -->
<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
<wml>
<template>
<do type="prev" label="Back">
<prev/>
</do>
</template>
<xsl:apply-templates />
</wml>
</xsl:template>
<xsl:template match="card">
<card>
<xsl:attribute name="id">
<xsl:value-of select="cardid"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="cardtitle"/>
</xsl:attribute>
</card>
</xsl:template>
<xsl:template match="img">
<p>
<xsl:attribute name="align">
<xsl:value-of select="imgalign"/>
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="imgsrc"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="imgalt"/>
</xsl:attribute>
</img>
</p>
</xsl:template>
<xsl:template match="link">
<p>
<xsl:attribute name="align">
<xsl:value-of select="linkalign"/>
</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:value-of select="linkhref"/>
</xsl:attribute>
<xsl:value-of select="linktitle"/>
</a>
</p>
</xsl:template>
<xsl:template match="text">
<p>
<xsl:attribute name="align">
<xsl:value-of select="textalign"/>
</xsl:attribute>
<xsl:value-of select="value"/>
</p>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list