Subject: RE: How dynamic is XSL? From: Søren Neigaard <neigaard@xxxxxxxxxxxxxx> Date: Thu, 10 Aug 2000 16:40:09 +0200 |
Ok - I now belive (thanks to Linda van...) that I have to use templates instead. I'm working on it. There's still one thing that puzzels me. How do I take values from the XML, and place them as values in the result via XSL: <?xml version="1.0"?> <?xml-stylesheet href="example.xsl" type="text/xsl" media="explorer"?> <?cocoon-process type="xslt"?> <card> <cardid>index</cardid> <cardtitle>WAP XML Test</cardtitle> <imgsrc>Graphics/header.wbmp</imgsrc> <imgalt>Header</imgalt> </card> <?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:variable name="v1"><xsl:value-of select="cardid"/></xsl:variable> <xsl:variable name="v2"><xsl:value-of select="cardtitle"/></xsl:variable> <card id="{$v1}" title"{$v2}"> <!-- dosent work --> <p align="center"> <img src="<xsl:value-of select="imgsrc"/>" alt="<xsl:value-of select="imgalt"/>"/> <!-- dosent work --> </p> </card> </wml> </xsl:template> </xsl:stylesheet> -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Thorbjørn Ravn Andersen Sent: 10. august 2000 14:50 To: 'xsl-list@xxxxxxxxxxxxxxxx' Subject: RE: How dynamic is XSL? > If I have a XML document with an abitrary mix of text and > links, can I then > make only one XSL that always can be used to transform that > XML document? > > For instance the XML could at one time, start with some text, > then have some > links, and end with some text. And at another time the XML > could start with > some links, then text, and then maybe some links again. I > think what I'm > askin, is is the <xsl:for-each> takes care of this problem, > or if the first > "for-each" takes care of links, then all the links are > handled first, and > there after the text (if any comes after the links)? > > Was this question clear? No. Please show a sample XML file. Are you working with XHTML documents? -- Thorbjørn Ravn Andersen "...and...Tubular Bells!" XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: How dynamic is XSL?, Thorbjørn Ravn Ander | Thread | RE: How dynamic is XSL?, Ben Robb |
XML/XLink/XSL fundamentals, Raheja, Dhruv (TRAN | Date | RE: keys: repeated nodes from same , Pawson, David |
Month |