ryanpatrick could you send me the coding for UPS and FED Ex Tracking. Having Touch time.
Trying to make my TRKCODE ELEMENT that has a link go to UPS/FED Ex Tracking.
--XML-
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="DOLWMDDXSL2.xsl"?>
<ORDERREQUISITION>
<REQUISITION>
<DATECRE>10/21/04</DATECRE>
<ORDNBR>2004226003658</ORDNBR>
<CUSTID>B0475</CUSTID>
<ORDQTY>1</ORDQTY>
<QTYDENIED>0</QTYDENIED>
<STATUS>SHIPPED!</STATUS>
<SHIPQTY>1</SHIPQTY>
<SHIPDATE>10/20/04</SHIPDATE>
<DEPOT>STLMO</DEPOT>
<CARRIERID>STDA</CARRIERID>
<CARRIERMODE>New: 1st Class Mail</CARRIERMODE>
<TRKCODE>000 890767#</TRKCODE>
</REQUISITION>
<REQUISITION>
<DATECRE>10/21/04</DATECRE>
<ORDNBR>2004265002722</ORDNBR>
<CUSTID>J0793</CUSTID>
<ORDQTY>13</ORDQTY>
<QTYDENIED>0</QTYDENIED>
<STATUS>SHIPPED!</STATUS>
<SHIPQTY>13</SHIPQTY>
<SHIPDATE>10/20/04</SHIPDATE>
<DEPOT>STLMO</DEPOT>
<CARRIERID>UPS</CARRIERID>
<CARRIERMODE>UPS Ground</CARRIERMODE>
<TRKCODE>1Z6816110368879763</TRKCODE>
<UPSXMLACCESS>
<?xml version="1.0"?>
<AccessRequest xml:lang="en-U">
<AccessLicenseNumber>5BAC51B0D14FC5C0</AccessLicenseNumber>
<UserId>smith3863</UserId>
<Password>ra3863Hx</Password>
</AccessRequest>
</UPSXMLACCESS>
<UPSXMLREQUEST>
<?xml version="1.0"?>
<TrackRequest xml:lang="en-US">
<Request>
<TransactionReference>
<CustomerContext>J0793</CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Track</RequestAction>
<RequestOption>activity</RequestOption>
</Request>
<TrackingNumber>1Z6816110368879763</TrackingNumber>
</TrackRequest>
</UPSXMLREQUEST>
<UPSXMLRESPONSE>
<?xml version="1.0"?>
<TrackResponse>
<Response>
<TransactionReference>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<ResponseStatusCode>0</ResponseStatusCode>
<ResponseStatusDescription></ResponseStatusDescription>
</Response>
<Shipment>
<Shipper>
<ShipperNumber>681611</ShipperNumber>
</Shipper>
<ShipTo>
</ShipTo>
<Service>
<Code>003</Code>
<Description>Ground</Description>
</Service>
<Package>
</Package>
</Shipment>
</TrackResponse>
</UPSXMLRESPONSE>
</REQUISITION>
</ORDERREQUISITION>
--XSL--
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:param name="nameSearchValue">2004265002722</xsl:param>
<xsl:template match="/">
<HTML>
<BODY>
<TABLE border="10" align="center">
<xsl:apply-templates select="/ORDERREQUISITION/REQUISITION">
<xsl:sort select="ORDNBR"/>
</xsl:apply-templates>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="REQUISITION">
<xsl:if test="ORDNBR=$nameSearchValue">
<TR> <xsl:apply-templates select="DATECRE" />
<xsl:apply-templates select="SHIPQTY" /></TR>
<TR> <xsl:apply-templates select="ORDNBR" />
<xsl:apply-templates select="SHIPDATE" /></TR>
<TR><xsl:apply-templates select="CUSTID" />
<xsl:apply-templates select="DEPOT" /></TR>
<TR><xsl:apply-templates select="ORDQTY" />
<xsl:apply-templates select="CARRIERID" /></TR>
<TR><xsl:apply-templates select="QTYDENIED" />
<xsl:apply-templates select="CARRIERMODE" /></TR>
<TR><xsl:apply-templates select="STATUS" />
<xsl:apply-templates select="TRKCODE" />
</TR>
<TR>
</TR>
<TR>
</TR>
</xsl:if>
</xsl:template>
<xsl:template match="DATECRE">
<TD bgcolor="lightblue"><B>Received Date: </B>
<xsl:apply-templates />
</TD>
</xsl:template>
<xsl:template match="SHIPQTY">
<TD bgcolor="lightblue"><B>Ship Qty: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="ORDNBR">
<TD bgcolor="lightblue"><B>Order Nbr: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="SHIPDATE">
<TD bgcolor="lightblue"><B>Ship Date: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="CUSTID">
<TD bgcolor="lightblue"><B>Customer Nbr: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="DEPOT">
<TD bgcolor="lightblue"><B>Depot: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="ORDQTY">
<TD bgcolor="lightblue"><B>Order Qty: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="CARRIERID">
<TD bgcolor="lightblue"><B>Carrier: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="QTYDENIED">
<TD bgcolor="lightblue"><B>Qty Denied: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="CARRIERMODE">
<TD bgcolor="lightblue"><B>Ship Mode: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
<xsl:template match="STATUS">
<TD bgcolor="lightblue"><B>Status: </B>
<xsl:apply-templates /> </TD>
</xsl:template>
--Like to link this Element to UPS--
<xsl:template match="TRKCODE">
<xsl:if test="starts-with(text(), '1Z')">
<td bgcolor="lightblue">
<b>Tracking Nbr:
<a href="http://wwwcie.ups.com/ups.app/xml/TRACK/UPSXMLACCESS/UPSXMLREQUEST/UPSXMLRESPONSE">
<xsl:value-of select="." />
</a>
</b>
</td>
</xsl:if>
<xsl:if test="starts-with(text(), '000')">
<td bgcolor="lightblue">
<b>Tracking Nbr:
<a href="http://www.usps.com/">
<xsl:value-of select="." />
</a>
</b>
</td>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Tommy Smith
|