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

Re: using parameters in a select (in the invoice exam

Subject: Re: using parameters in a select (in the invoice example)
From: Ray Allis <ray.allis@xxxxxxxxxx>
Date: Tue, 24 Apr 2001 13:09:59 -0700
invoice.css
lwong@xxxxxxxxxxx wrote:

Ok.  What are people doing to get around not being able to use variable
references in the match statement?

Thanks,
Leah

Is THAT why this nifty example doesn't work?


<?xml version="1.0"?>
<!DOCTYPE xsl:transform [
<!ENTITY css SYSTEM "invoice.css">
]>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- invoice.xsl, v1.0
Written by Christopher R. Maden, Lexica LLC
crism@xxxxxxxxxx -->
<!-- This stylesheet takes an invoice with a series of billable
periods, and produces an invoice in HTML for one particular
period, itemized by project and billing rate.

[ ... ]

<!-- Get the end date of the last period. -->
<xsl:variable name="temp-date"
select="/billable/period[last()]/@end"/>

-------------------------------------------------------------------------
1000 analogy /export/home/ray/tomcat/logs:

XSL Error: pattern = '$temp-date'
VariableReference given for variable out of context or without definition!  Name = temp-date, source tree node: #document
XSL Error: pattern = '/billable/period[@end=$period-end-date]'
Could not get variable named period-end-date
XSL Error: pattern = '$period/@start'
Could not get variable named period
XSL Error: pattern = '$period-start-date'
Could not get variable named period-start-date
XSL Error: SAX Exception



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.