|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: cannot include global level variables
I just found out the problem is because the url.xsl is not a proper style sheet. Thanks, Shining -----Original Message----- From: Chang, Shining [mailto:Shining.Chang@xxxxxxxxxxxxx] Sent: Wednesday, August 20, 2003 7:20 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: cannot include global level variables I'd like to include a xsl, which contains a url link. Somehow, it does not work. Here is my code in A.xsl: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:name="http://blue.com/eng/arch/dna/name/" xmlns:bo="http://blue.com/eng/arch/dna/bo/" xmlns:dna="http://blue.com/eng/arch/dna/type/"> <xsl:output method="xml" omit-xml-declaration="yes" /> <xsl:import href="config/bp/xsl/url.xsl" /> <xsl:template match="/dna:dna"> ... <tr> <td width="324" align="right"><img> <xsl:attribute name="src"><xsl:copy-of select="$url" />?BARCODE=<xsl:value-of select="bo:USER_ACCOUNT/name:customerNum"/>&BAR_HEIGHT=.5&FONT_COLOR=WHITE&WIDTH=100</xsl:attribute> <xsl:attribute name="height">50</xsl:attribute> <xsl:attribute name="width">100</xsl:attribute> </img></td> </tr> ... </xsl:template> and in "url.xsl", I have: <xsl:variable name="url"> <xsl:text>//localhost:7019/servlet/barCode</xsl:text> </xsl:variable> With this code, I got error: file:///C:/clienteling/; Line -1; Column -1; VariableReference given for variable out of context or without definition! Name = url If I replace the <xsl:include ...> with the actual code in url.xsl, then it worked. I did make sure that the "href" points to the right file. Is it because the way I am writing the url.xsl file? Any suggestions are appreciated. Thanks, Shining XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|

Cart








