Preformatting RFC 822 using XSLT 1.0

J

Jure Sah

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

How can I remove the optional weekday plus comma from a RFC 822 date
using just XSLT 1.0 functions?

The problem is a RFC 822 date is either:

Fri, 06 Mar 2009 02:04:00 +0000

....or...

06 Mar 2009 02:04:00 +0000

I want either date to end up as:

06 Mar 2009 02:04:00 +0000

How can I do this using just XSLT 1.0 functions? Using XSLT tags is not
an option in this case, I need it in functions.

Thanks a bunch for any help in advance.

LP,
Jure
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJsvDNB6mNZXe93qgRAiNQAKC25/TzAyXsvs9ulBjSYxcG9fIq+QCZAVR7
IC1xmYMjNybLlgTcXuPfPzA=
=xxuR
-----END PGP SIGNATURE-----
 
J

Jure Sah

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Spoke too soon.

The motto of XSLT should be: Never give up.

substring(date,string-length(date)-25)

LP,
Jure
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJsvKhB6mNZXe93qgRAkqrAJ4wKc7rGegk7hX7R4Awvi1I1FbgywCffhAa
meC4y1F7lHEMDtZf5VavdGw=
=PfcV
-----END PGP SIGNATURE-----
 
P

Peter Flynn

Jure said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Spoke too soon.

The motto of XSLT should be: Never give up.

substring(date,string-length(date)-25)

Or perhaps, a little more obviously, substring-after(date,', ') when it
contains a comma-space, and just the value-of when it doesn't.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top