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

Xsl:variable content should be empty

Subject: Xsl:variable content should be empty
From: "Alan Hale" <alan.hale@xxxxxxxxxxx>
Date: Wed, 4 Apr 2007 10:30:58 +0100
 Xsl:variable content should be empty
I'm a relative newcomer to xslt and I wonder if someone could kindly
explain to me what is the issue with the following use of xsl:variable
and how I can correct it:

      <xsl:for-each select="/fieldguide/account">
            
      <xsl:variable name="link" select="file_link"> </xsl:variable>
	.
	.
	<td><a target = "_parent" href="{$link}"><xsl:value-of
select="species_name"/></a></td>
	.
	.
	</xsl:for-each>

Here is a fragment of the XML:

<fieldguide>
  <account> 
     <species_name>Octodiceras fontanum</species_name>
     <file_link>../accounts/mosses/Octodiceras
fontanum_DMT.pdf</file_link>
     .
     .	
  </account>
</fieldguide>


As you can see, I am trying to construct an html link from the filename
and path held in the <file_link> element.

This works fine when I call the stylesheet in-line or from Javascript in
Internet Explorer, but when I run it with the PHP XSL extension, it
generates a warning: Xsl:variable content should be empty since select
is present. It's only a warning and the output is still as expected, but
clearly I'm doing something wrong.

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-2007 All Rights Reserved.