[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Concat function - URGENT pls

Subject: RE: Concat function - URGENT pls
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Mon, 10 Mar 2003 16:44:42 -0700
xslt concat function
> 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(
> 					
> 						&lt;value-of
> select="//MovementDate">&lt;xsl:value-of>,'@', &lt;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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.