[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
lwong@xxxxxxxxxxx wrote:
Ok. What are people doing to get around not being able to use variable references in the match statement? 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|