xsl-list
[Top] [All Lists]

Re: [xsl] Need help combing two elements

2009-03-27 15:04:19
Fatbob schrieb:

Is it possible to combine two elements using XSL so that they display
as one?

 <Cell longDate="1143122100140" ChangeContext="FID=50020"
 ShowLink="true" Status="Normal">Mar 23, 2006</Cell>
 <Cell ChangeContext="FID=50020" ShowLink="true"
 Status="Normal">08:44</Cell>

Assuming (a) your Cell/@longDate has all the information that is needed,
(b) it can be converted to a UNIX timestamp and (c) you wouldn't mind
using extension functions, you could call your XSLT from, say, Perl,
register a suitable extension function and then call back from your XSLT
into Perl passing Cell/@date as a string which you then have all the
power of strftime() to format in any way you like.

http://search.cpan.org/perldoc?XML%3A%3ALibXSLT

Look for "register_function".

Michael Ludwig

--~------------------------------------------------------------------
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>
--~--