Subject: [xsl] RE: No Subject Line From: "McNally, David" <David.McNally@xxxxxxxxxx> Date: Wed, 30 Jan 2002 11:24:51 -0500 |
Your other post suggested that the problem appeared after upgrading Xalan - have you tried some other XSLT processor to see if it really is an XSLT problem? I just tried this on Saxon, and it worked fine (using a short string and a search/replace template I had lying around). David. -- David McNally Moody's Investors Service Software Engineer 99 Church St, NY NY 10007 David.McNally@xxxxxxxxxx (212) 553-7475 > -----Original Message----- > From: Jay Burgess [mailto:jburgess@xxxxxxxxxxxxxx] > Sent: Wednesday, January 30, 2002 10:00 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: > > > (Since my previous post didn't get any responses, I'm trying > again, but > this time stating my problem purely in terms of XSL.) > > Below is a simple encode template for name/value pairs in the > query string > of a URL. Is there a better way to do this? The reason I'm > asking is that > it doesn't always work, and in the cases it fails, it appears > like the > "value2" variable is trying to initialize before "value1" is > fully defined > (timing problem?). > > <xsl:template name="param"> > <xsl:variable name="value1"> > <xsl:call-template name="encode"> > <xsl:with-param name="inString" select="string(.)"/> > <xsl:with-param name="oldChars" select="'%'"/> > <xsl:with-param name="newChars" select="'%25'"/> > </xsl:call-template> > </xsl:variable> > <xsl:variable name="value2"> > <xsl:call-template name="encode"> > <xsl:with-param name="inString" > select="string($value1)"/> > <xsl:with-param name="oldChars" select="' '"/> > <xsl:with-param name="newChars" select="'%20'"/> > </xsl:call-template> > </xsl:variable> > <xsl:text>"&</xsl:text><xsl:value-of > select="@name"/><xsl:text>="</xsl:text><xsl:value-of > select="$value2"/> > </xsl:template> > > Thanks. > > Jay > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > --------------------------------------- The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission. If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments. Thank you. Every effort is made to keep our network free from viruses. You should, however, review this e-mail message, as well as any attachment thereto, for viruses. We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] building a tabular format, V K | Thread | [xsl] RE: supposed timing problem, Jay Burgess |
RE: [xsl] page-number-citation, DPawson | Date | [xsl] templates matches ... ?, Frederic Leclercq |
Month |