238 Selling and Fulfillment Solutions Using WebSphere Commerce and IBM Sterling Order
<xsl:attribute name="ListPrice">
<xsl:value-of
select="_ord:OrderItemAmount/_wcf:UnitPrice/_wcf:Price" />
</xsl:attribute>
<xsl:attribute name="RetailPrice">
<xsl:value-of
select="_ord:OrderItemAmount/_wcf:UnitPrice/_wcf:Price" />
</xsl:attribute>
<xsl:attribute
name="IsLinePriceForInformationOnly">N</xsl:attribute>
<xsl:attribute
name="PricingQuantityStrategy">FIX</xsl:attribute>
<xsl:attribute
name="IsPriceLocked">Y</xsl:attribute>
</LinePriceInfo>
<LineCharges>
<xsl:variable name="amount"
select="sum(_ord:OrderItemAmount/_wcf:Adjustment/_wcf:Amount)" />
<LineCharge>
<xsl:attribute
name="ChargeCategory">Discount</xsl:attribute>
<xsl:attribute name="ChargePerLine">
<xsl:value-of select="$amount * ($amount
&gt;= 0) - $amount * ($amount &lt; 0)" />
</xsl:attribute>
</LineCharge>
<LineCharge>
<xsl:attribute
name="ChargeCategory">Shipping</xsl:attribute>
<xsl:attribute name="ChargeName">Shipping
Charge</xsl:attribute>
<xsl:attribute name="ChargePerLine">
<xsl:value-of
select="_ord:OrderItemAmount/_wcf:ShippingCharge" />
</xsl:attribute>
</LineCharge>
</LineCharges>
<LineTaxes>
<LineTax>
<xsl:attribute
name="ChargeCategory">Price</xsl:attribute>
<xsl:attribute name="Tax">
<xsl:value-of
select="_ord:OrderItemAmount/_wcf:SalesTax" />
</xsl:attribute>
Appendix A. Supporting content 239
<xsl:attribute name="TaxName">Sales
Tax</xsl:attribute>
</LineTax>
<LineTax>
<xsl:attribute
name="ChargeCategory">Shipping</xsl:attribute>
<xsl:attribute name="Tax">
<xsl:value-of
select="_ord:OrderItemAmount/_wcf:ShippingTax" />
</xsl:attribute>
<xsl:attribute name="TaxName">Shipping
Tax</xsl:attribute>
</LineTax>
</LineTaxes>
</OrderLine>
</xsl:for-each>
</OrderLines>
<PersonInfoBillTo>
<xsl:attribute name="FirstName">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:ContactName/_wcf:FirstName" />
</xsl:attribute>
<xsl:attribute name="LastName">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:ContactName/_wcf:LastName" />
</xsl:attribute>
<xsl:attribute name="AddressLine1">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:AddressLine[1]" />
</xsl:attribute>
<xsl:attribute name="AddressLine2">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:AddressLine[2]" />
</xsl:attribute>
<xsl:attribute name="AddressLine3">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:AddressLine[3]" />
</xsl:attribute>
<xsl:attribute name="City">
240 Selling and Fulfillment Solutions Using WebSphere Commerce and IBM Sterling Order
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:City" />
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:StateOrProvinceName" />
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:Country" />
</xsl:attribute>
<xsl:attribute name="ZipCode">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:Address/_wcf:PostalCode" />
</xsl:attribute>
<xsl:attribute name="EMailID">
<xsl:value-of
select="$order/_ord:OrderPaymentInfo/_ord:PaymentInstruction/_ord:Billi
ngAddress/_wcf:EmailAddress1/_wcf:Value" />
</xsl:attribute>
</PersonInfoBillTo>
</Order>
</xsl:template>
</xsl:stylesheet>

Get Selling and Fulfillment Solutions Using WebSphere Commerce and IBM Sterling Order Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.