[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How dynamic is XSL?

Subject: RE: How dynamic is XSL?
From: Søren Neigaard <neigaard@xxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2000 16:40:09 +0200
xsl dynamic links
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.