|
Subject: [xsl] How would I go about changing my single quotes to double quotes in my XML output line ? From: "Catherine Wilbur cwilbur@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 20 Nov 2014 22:06:02 -0000 |
Have following code in XSL stylesheet
Have string fields I surround by single quotes. How would I change the
single quote to a double quote without getting a syntax error in the
<xsl:value-of select=. Reason I am asking is because some of my string
fields might have a single quote embedded so I want to surround my string
fields by double quotes. With the logic below it causes a syntax error
with the <xsl:value-of select=" field sytax.
Anyone have any ideas?
<!--
================================================================================================================================
Output the CSV comma delimited file with
fields in the following order:
Seq#, UserId, Batch#, Vendor#, GLAcct,
Invoice#, InvoiceDate, GLDate, Currency, ExchgRate, TotInvoiceAmnt,
InvoiceLineAmnt, Attachment, PaymentTerms, Remark
Remark is a combination of the unique
identifier (16 chars) plus the first 14 characters of the vendor code
"
" is a line feed (this is one we need to use
to generate new line)
"
" is a carriage return
Note: Amount fields and exchange rate fields
must be written out as implied decimal fields
================================================================================================================================
-->
<xsl:value-of select="position(),
'LIBPROD',
local:sort-key($InvoiceCurrency,$InvoicePOLineOwner),
$Derived_FISVendorNo,
concat('''',../external_id[1],''''),
concat('''',$inv/invoice_number[1],''''),
concat(substring($InvoiceDateValue,5,4),substring($InvoiceDateValue,1,2),substring($InvoiceDateValue,3,2)),
$Derived_GLDateValue,
$inv/invoice_amount[1]/currency[1],
$Derived_ExchgRate,
$Derived_InvoiceAmnt,
$Derived_InvoiceLineFundAmnt,
$Derived_PaymentAttachment,
$Derived_PaymentTerms
,
concat('''',$inv/unique_identifier[1],substring($inv/vendor_code[1],1,14),'''')"
separator=","/>
<xsl:text>
</xsl:text>
_____________________________________________________________________
Catherine Wilbur
(E) cwilbur@xxxxxxxxxxx
www.uwindsor.ca/its
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Creating list using xslt, Vasu Chakkera vasucv | Thread | Re: [xsl] How would I go about chan, Graydon graydon@xxxx |
| Re: [xsl] Creating new, distinct gr, Michael Friedman sum | Date | Re: [xsl] How would I go about chan, Graydon graydon@xxxx |
| Month |