|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Concat function - URGENT pls
> From: Challa, Harsha [mailto:hchalla@xxxxxxxxxxxx] > Sent: Monday, March 10, 2003 4:22 PM > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: 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
|
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








