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

Re: Need help combing two elements

Subject: Re: Need help combing two elements
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Fri, 27 Mar 2009 20:02:52 +0100
Re:  Need help combing two elements
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

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.