[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Fw: How would I create this derived field in XML from different XML fields

Subject: Re: [xsl] Fw: How would I create this derived field in XML from different XML fields
From: "Wolfgang Laun wolfgang.laun@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Oct 2014 06:11:26 -0000

Code snippet causing a syntax error:

<xsl:variable name="CurrDateTimeValue"

Change this to

<xsl:variable name="CurrDateTimeValue"

You have to use quotes (0x22) within apostrophes (0x27) and vice versa.


On 30 October 2014 06:54, Hank Ratzesberger xml@xxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> What environment do you run this transform in?  i.e. Are you able to pass
> a parameter through a batch file / command line?
> This describes inserting scripting in C# and passing the current date as a
> parameter variable, created/formatted in some other scripting language:
> http://stackoverflow.com/questions/9394322/xslt-1-0-get-current-datetime
> Cheers,
> Hank
> On Wed, Oct 29, 2014 at 1:18 PM, Catherine Wilbur cwilbur@xxxxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> How do I create a variable field in xsl 1.0 called batch number with the
>> following format requirement.  Attempted to code myself - getting error
>> We only have Xsl 1.0 not 2.0 as previously stated.
>>         YYYYMMDD is current date - converted to a string field
>>         HH is current hour - converted to a 2 character string field
>>         mm is current minutes -converted to a 2 character string field
>>         X will either be L for Leddy or W for Law depending on the value
>> from <po_line_owner> field  (see below)
>> invoice_list/invoice/invoice_line_list/invoice_line/po_line_info/
>> *po_line_owner*
>>         CUR will be a Currency value of (CDN or USD) and pulled from the
>> invoice_list/invoice/invoice_amount/*currency*
>> What values would I find in the po_line_owner:
>>         <po_line_owner>*Paul Martin Law Library*</po_line_owner>
>>         <po_line_owner>*Leddy Library*</po_line_owner>
>>         Note:  if we find the word Law in po_line_owner then make value
>> of X a "W" otherwise make the X  value an "L"
>> [snip]
> --
> Hank Ratzesberger
> XMLWerks.com
>   XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/528976> (by
> email <>)

Current Thread