This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: URGENT - my first xsl
- To: xsl-list at mulberrytech dot com
- Subject: RE: URGENT - my first xsl
- From: anatd at shopy dot co dot il
- Date: Thu, 10 Aug 2000 17:35:18 +0200
- Reply-To: xsl-list at mulberrytech dot com
Hi,
do:
<card>
<xsl:attribute name="id">
<xsl:value-of select="cardid"/>
</xsl:attribute>
<xsl:attribute name=" title">
<xsl:value-ofselect="cardtitle"/>
</xsl:attribute>
<p align="center">
<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:for-each select="link">
<a>
<xsl:attribute name="href">
<xsl:value-of select="linkhref"/>
</xsl:attribute>
<xsl:value-of select="linktitle"/>
</a>
</xsl:for-each>
<xsl:for-each select="text">
<xsl:value-of select="text"/>
</xsl:for-each>
</card>
-----Original Message-----
From: neigaard@mobilethink.dk [mailto:neigaard@mobilethink.dk]
Sent: Thursday, August 10, 2000 2:48 PM
To: Xsl-List (E-mail)
Subject: URGENT - my first xsl
I'm trying to make a XSL for a dynamic XML document to wml, but I'm doing
somthing(s) wrong.
The error msg. is: The value of attribute "id" must not contain the '<'
character.
<?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:for-each select="card">
<card id="<xsl:value-of select="cardid"/>" title"<xsl:value-of
select="cardtitle"/>">
<p align="center">
<img src="<xsl:value-of select="imgsrc"/>" alt="<xsl:value-of
select="imgalt"/>"/>
</p>
<xsl:for-each select="link">
<a href="<xsl:value-of select="linkhref"/>"><xsl:value-of
select="linktitle"/></a>
</xsl:for-each>
<xsl:for-each select="text">
<xsl:value-of select="text"/>
</xsl:for-each>
</card>
</xsl:for-each>
</wml>
</xsl:template>
</xsl:stylesheet>
Med venlig hilsen/Best regards
Søren Neigaard
-------------------------------
MobileThink A/S
Udviklingsparken
Sønderhøj 46
8260 Viby J
Denmark
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list