xsl-list
[Top] [All Lists]

[xsl] selecting a node to concatenate

2007-10-04 10:26:07
I have a node in my XML which contains a date string. I want to
concatenate it into an integer. I can do the concat part using
substrings but can't work out how to select the node in the first
instance!

The XML looks like this...

<submissionDeadline>2027-10-04T09:00:00.0000000-00:00</submissionDeadline>

...if I pass it to the stylesheet as a param or variable I can concatanate it...

<xsl:variable 
name="currentTime">2007-10-04T09:00:00.0000000+01:00</xsl:variable>
<xsl:variable name="currentTimeString"
select="concat(substring($currentTime, 1,4),substring($currentTime,
6,2),substring($currentTime,
9,2),substring($currentTime,12,2),substring($currentTime,15,2),substring($currentTime,18,2))"/>

... to make it look like this...

20071004090000

I need a way to select the <submissionDeadline> nodes content to get a
similar result.

Any ideas? Thanks for any suggestions...

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>