Re: [xml] shell function for XSLT
- From: cbozeman hiwaay net
- To: Nic Ferrier <nferrier tapsellferrier co uk>
- Cc: xml gnome org
- Subject: Re: [xml] shell function for XSLT
- Date: Wed, 23 Jun 2004 08:15:45 -0500 (CDT)
A couple of possible alternatives:
1) Implement the exslt routines parse-date and format-date for libexslt.
2) Implement the exslt routine parse-date and use Jeni Tennison's exslt:function
version of format-date.
3) Parse the date-str variable into xs:date format and then use Jeni Tennison's
I think implementing a shell function would not only be dangerous but difficult
to maintain under the various operating systems supported by libxslt.
Quoting Nic Ferrier <nferrier tapsellferrier co uk>:
What do people think about the idea of adding a shell function to
libxml2's xpath? I'm thinking of something that would make this XSLT
<xsl:value-of select="shell('date --date=$date-str --rfc-2822')"/>
when invoked with the following:
<date>12 January 2004</date>
this would output:
<converted-date>Mon, 12 Jan 2004 00:00:00 +0000</converted-date>
There would have to be restrictions on the shell command used.
$ would have to indicate XSLT parameters, not shell params.
quoting would have to be automatic (around xslt paramters for
entitys would have to be resolved automatically.
I'd think about investigating implementation of this if anyone else
Alternately does anyone have another way of achieving similar things?
xml mailing list, project page http://xmlsoft.org/
xml gnome org
] [Thread Prev