[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Concat function - URGENT pls


Subject: RE: [xsl] Concat function - URGENT pls
From: "XSLList" <xsllist@xxxxxxxxxxxxx>
Date: Mon, 10 Mar 2003 18:55:59 -0500

Here's two ways to do it....

<?xml version="1.0"?>
<POD>
	<PODDate>3/10/2003</PODDate>
	<PODTime>9:14</PODTime>
</POD>


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:output method="text"/>
	<xsl:template match="POD">
		<xsl:text>&#xa;First method&#xa;</xsl:text>

		<xsl:value-of select="PODDate"/>
		<xsl:text>@</xsl:text>
		<xsl:value-of select="PODTime"/>
		<xsl:text>:00</xsl:text>

		<xsl:text>&#xa;Second method&#xa;</xsl:text>
		<xsl:value-of select="concat(PODDate, '@', PODTime, ':00')"/>

	</xsl:template>
</xsl:stylesheet>



>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>
>
>Any help will be appreciated,
>BTW, Can I concat any number of strings with the concat function?
>
>
>thanks in advance
>Harsha
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread