[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How dynamic is XSL?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|