Subject: RE: [xsl] Concat function - URGENT pls From: "Martinez, Brian" <brian.martinez@xxxxxxxx> Date: Mon, 10 Mar 2003 16:44:42 -0700 |
> From: Challa, Harsha [mailto:hchalla@xxxxxxxxxxxx] > Sent: Monday, March 10, 2003 4:22 PM > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Concat function - URGENT pls > > I give up > > I am having trouble using the concat function > I am just forming a date time element by selecting values of > date and time > elements > I am getting all sorts of errors, syntactical > > Source > <PODDate>3/10/2003</PODDate> > <PODTime>9:14</PODTime> > > Needs to be transformed to > <MovementDateTime>03/17/2003@09:14:0</MovementDateTime> > > > > <xsl:element name="MovementDateTime"> > <xsl:value-of > select= "concat( > > <value-of > select="//MovementDate"><xsl:value-of>,'@', <value-of > select="//MovementTime"></xsl:value-of>,':00')"/> > > </xsl:element> First, keep in mind that concat() and other XPath/XSLT functions accept expressions, not literal XSLT elements, as arguments. Second, there appears to be a mismatch in your expressions: you look for //MovementDate, but your source says <PODDate>. This should do it: <MovementDateTime><xsl:value-of select="concat(//PODDate,'@',//PODTime,':00')"/></MovementDateTime> > BTW, Can I concat any number of strings with the concat function? Yes. hth, b. | brian martinez brian.martinez@xxxxxxxx | | lead gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.com/ | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Concat function - URGENT , Dion Houston | Thread | [xsl] Answers to review questions i, Lars Huttar |
RE: [xsl] Concat function - URGENT , Dion Houston | Date | Re: [xsl] xpath visualizer for linu, Daniel Veillard |
Month |