Altova Mailing List Archives


Modifying xsl/xml documents

From: gtlost@-----------.---------.---
To: NULL
Date: 6/29/2005 8:06:00 AM
I have no clue about xml and xsl.  I have been tasked with trying to modify 
an performa which is an invoice that sits in one of our software programs.  I 
tried to modify the document and nothing I changed came across, such as at 
the bottom of the performa there are instructions that I deleted (see section 
below):

<table>
		<tr><td/> <td>We would like to continue on the current maintenance 
program.</td></tr>
		<tr><td>_______</td><td>Our purchase order is enclosed</td></tr>
		<tr><td>_______</td><td>Our purchase order number is 
_____________.</td></tr>
		<tr><td>_______</td><td>Purchase order is not required to be 
invoiced.</td></tr>
		<tr><td/> <td><B>AN INVOICE WILL BE SENT <U>AFTER</U> CONFIRMATION OF 
ORDER. DO <U>NOT</U> SEND CHECK IN ADVANCE.</B></td></tr>
		</table>

but it's still on the form when we rerun the performa???  What am I not 
doing to modify this document.  See xml and xl below....

<!--
	proformaTemplate.XML - XML template file for Softrax proforma generation.

	Copyright (c) by Softrax Corporation, Canton MA. All rights reserved.

	John L. Moss, December 2000
-->
<STXDOCUMENT TYPE="PROFORMA">
	<HEADER FORM="CONTAINER">
		<COCODE></COCODE>
		<ORDNO></ORDNO>
		<DATE></DATE>
		<ADDRESSES FORM="CONTAINER">
			<BILLTO FORM="CONTAINER">
				<NAME/>
				<COMPANY></COMPANY>
				<ADDR1></ADDR1>
				<ADDR2></ADDR2>
				<ADDR3></ADDR3>
				<ADDR4></ADDR4>
				<CITY></CITY>
				<STATE></STATE>
				<ZIP></ZIP>
				<COUNTRY></COUNTRY>
				<ATTN></ATTN>
			</BILLTO>
			<SHIPTO FORM="CONTAINER">
				<NAME/>
				<COMPANY></COMPANY>
				<ADDR1></ADDR1>
				<ADDR2></ADDR2>
				<ADDR3></ADDR3>
				<ADDR4></ADDR4>
				<CITY></CITY>
				<STATE></STATE>
				<ZIP></ZIP>
				<COUNTRY></COUNTRY>
				<ATTN></ATTN>
			</SHIPTO>
		</ADDRESSES>
		<CUSTOMER FORM="CONTAINER">
			<GROUP></GROUP>
			<CODE></CODE>
			<NAME></NAME>
			<PO></PO>
			<CURRENCY></CURRENCY>
			<TERMS></TERMS>
			<SHIPVIA></SHIPVIA>
			<SALESMAN></SALESMAN>
		</CUSTOMER>
	</HEADER>
	<LINEITEMS FORM="CONTAINER">
		<LINE FORM="REPEATING">
			<GROUP></GROUP>
			<NO></NO>
			<SKU></SKU>
			<DESCR></DESCR>
			<DROPSHIP></DROPSHIP>
			<USERS></USERS>
			<UNITS></UNITS>
			<UMEASURE></UMEASURE>
			<UPRICE></UPRICE>
			<DISCOUNT></DISCOUNT>
			<LINTOTAL></LINTOTAL>
			<MAINT></MAINT>
			<SERIAL></SERIAL>
			<DETCOMMENT></DETCOMMENT>
		</LINE>
	</LINEITEMS>
	<FOOTER FORM="CONTAINER">
		<ORDTOTAL></ORDTOTAL>
		<COMMENT></COMMENT>
	</FOOTER>
</STXDOCUMENT>
************************
Here's the xsl:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
	<!-- 
		Basic proforma stylesheet. Copyright (c) 2000 by Softrax Corporation, 
Canton MA
     		John L. Moss, February 2001
	-->
	<xsl:template>
		<xsl:apply-templates/>
	</xsl:template>
	<!-- Document level template -->
	<xsl:template match="STXDOCUMENT">
		<HTML>
			<HEAD>
				<style type="text/css">
      td.title {color: #FFFFFF; font-family:Arial; font-size:12; 
border-color: #000000; border:no; background-color: #000000}
	td.std {color: #000000; border: no; font-family:Arial; font-size:12;}
	td.stdbold {color: #000000; border:no; font-family:Arial; font-size:12;}
      td.wtitle {color: #000000; font-family:Arial; font-size:12; 
font-weight: bold}
	td.detail {color: #000000; font-family:Arial; font-size:9;}
	tr.dark {background-color: #000000}
	tr.light {background-color: #FFFFFF}
      body.std {font-family:Times-Roman; font-size:10}
      </style>
			</HEAD>
				<BODY class="std">
					<table align="left" bordercolor="#FFFFFF">
						<tr>
							<td><img 
src="http://www.softrax.com/image/delivered_by_softrax.gif"/></td>
						</tr>
					</table>
				<p align="right"><font face="Arial" size="6"><b>THIS IS NOT AN 
INVOICE</b></font></p>
				<p align="right"><font face="Arial" size="5"><b>Proforma</b></font></p>
				<xsl:apply-templates/>
			</BODY>
		</HTML>
	</xsl:template>
	<!-- Template for header level data -->
	<xsl:template match="HEADER">
		<div align="right">
			<table border="1" width="45%" cellspacing="0">
				<tr class="light">
					<td class="stdbold">Company</td>
					<td class="stdbold">Order #</td>
					<td class="stdbold">Date</td>
					<td class="stdbold">Page</td>
				</tr><tr class="light">
					<td class="std"><xsl:value-of select="COCODE"/></td>
					<td class="std"><xsl:value-of select="ORDNO"/></td>
					<td class="std"><xsl:value-of select="DATE"/></td>
					<td class="std">1 of 1</td>
				</tr>
			</table>
		</div>
		<xsl:apply-templates/>
	</xsl:template>
	<!-- Template for BILLTO and SHIPTO addresses -->
	<xsl:template match="ADDRESSES">
		<p/> <p/> 
		<table border="0" width="100%" cellspacing="0">
			<tr>
				<td class="wtitle">To:</td>
				<td><xsl:value-of select="BILLTO/COMPANY"/></td>
				<td class="wtitle">Ship to:</td>
				<td><xsl:value-of select="SHIPTO/COMPANY"/></td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/ADDR1"/></td>
				<td/> <td><xsl:value-of select="SHIPTO/ADDR1"/></td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/ADDR2"/></td>
				<td/> <td><xsl:value-of select="SHIPTO/ADDR2"/></td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/ADDR3"/></td>
				<td/> <td><xsl:value-of select="SHIPTO/ADDR3"/></td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/ADDR4"/></td>
				<td/> <td><xsl:value-of select="SHIPTO/ADDR4"/></td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/CITY"/>, <xsl:value-of 
select="BILLTO/STATE"/>
					<xsl:value-of select="BILLTO/ZIP"/>
				</td>
				<td/> <td><xsl:value-of select="SHIPTO/CITY"/>, <xsl:value-of 
select="SHIPTO/STATE"/>
					<xsl:value-of select="SHIPTO/ZIP"/>
				</td>
			</tr>
			<tr>
				<td/> <td><xsl:value-of select="BILLTO/COUNTRY"/></td>
				<td/> <td><xsl:value-of select="SHIPTO/COUNTRY"/></td>
			</tr>
			<tr><td/> <td><hr color="#FFFFFF"></hr></td></tr>
			<tr>
				<td/> <td><b>Attn: </b><xsl:value-of select="BILLTO/ATTN"/></td>
				<td/> <td><b>Attn: </b><xsl:value-of select="SHIPTO/ATTN"/></td>
			</tr>
		</table>
	</xsl:template>
	<!-- Telplate for the customer information line -->
	<xsl:template match="CUSTOMER">
		<p/> <p/> 
		<table border="1" width="100%" cellspacing="0">
			<tr class="dark">
				<td class="title">Customer</td>
				<td class="title">PO Number</td>
				<td class="title">Terms</td>
				<td class="title">Currency Code</td>
				<td class="title">Ship Via</td>
				<td class="title">Salesperson</td>
			</tr>
			<tr>
				<td class="std"><xsl:value-of select="GROUP"/>
					<xsl:value-of select="CODE"/>
					<xsl:value-of select="NAME"/></td>
				<td class="std"><xsl:value-of select="PO"/></td>
				<td class="std"><xsl:value-of select="TERMS"/></td>
				<td class="std"><xsl:value-of select="CURRENCY"/></td>
				<td class="std"><xsl:value-of select="SHIPVIA"/></td>
				<td class="std"><xsl:value-of select="SALESMAN"/></td>
			</tr>
		</table>
		<br/><br/>
	</xsl:template>
	<!-- Template for detail lines -->
	<xsl:template match="LINEITEMS">
		<table border="0" width="100%" cellspacing="0">
			<tr class="dark">
				<td class="title">No.</td>
				<td class="title" WIDTH="45%">Item/Description/Comments</td>
				<td class="title">Drop Ship</td>
				<td class="title"># Users</td>
				<td class="title" align="right">Quantity</td>
				<td class="title" align="center">U/M</td>
				<td class="title" align="right">Unit Price</td>
				<td class="title" align="center">Disc %</td>
				<td class="title" align="right">Total Cost</td>
			</tr>
			<tr><td colspan="8"><hr/></td></tr>
			<xsl:for-each select="LINE">
				<xsl:apply-templates/>
				<tr>
					<td class="detail"><xsl:value-of select="NO"/></td>
					<td class="detail"><xsl:value-of select="SKU"/>
						<xsl:value-of select="DESCR"/></td>
					<td class="detail"><xsl:value-of select="DROPSHIP"/></td>
					<td class="detail" align="center"><xsl:value-of select="USERS"/></td>
					<td align="right" class="detail"><xsl:value-of select="UNITS"/></td>
					<td align="center" class="detail"><xsl:value-of select="UMEASURE"/></td>
					<td align="right" class="detail"><xsl:value-of select="UPRICE"/></td>
					<td align="center" class="detail"><xsl:value-of select="DISCOUNT"/></td>
					<td align="right" class="detail"><xsl:value-of select="LINTOTAL"/></td>
				</tr>
				<xsl:for-each select="MAINT">
					<tr><td/> 
						<td class="detail"><xsl:value-of select="."/></td>
					</tr>
				</xsl:for-each>
				<xsl:for-each select="SERIAL">
					<tr><td/> 
						<td class="detail"><xsl:value-of select="."/></td>
					</tr>
				</xsl:for-each>
				<xsl:for-each select="DETCOMMENT">
					<tr><td/> 
					<td class="detail"><xsl:value-of select="."/></td>
					</tr>
				</xsl:for-each>
			</xsl:for-each>
		</table>
	</xsl:template>
	<!-- Template for LINE GROUP titles -->
	<xsl:template match="LINE/GROUP">
		<tr><td><hr color="#FFFFFF"></hr></td></tr>
		<tr>
			<td/> <td class="wtitle"><B><xsl:value-of select="."/></B></td>
		</tr>
	</xsl:template>
	<!-- Template for footer -->
	<xsl:template match="FOOTER">
		<div align="right">
			<hr/>
			<table align="right" cellspacing="1">
				<tr>
					<td align="left" class="std"><b>Does not include any applicable 
taxes</b></td>
					<td align="right" class="title">Order total</td>
					<td align="right" class="std"><xsl:value-of select="ORDTOTAL"/></td>
				</tr>
			</table>
			<table width = "50%" align="left">
				<tr>
					<td class="std"><b>Comment: </b></td>
					<td class="std"><xsl:value-of select="COMMENT"/></td>
				</tr>
			</table>
		</div>
		<div>
		<p/> <br clear="all"/><hr/>
		<font size="1">
		<table>
		<tr><td/> <td>We would like to continue on the current maintenance 
program.</td></tr>
		<tr><td>_______</td><td>Our purchase order is enclosed</td></tr>
		<tr><td>_______</td><td>Our purchase order number is 
_____________.</td></tr>
		<tr><td>_______</td><td>Purchase order is not required to be 
invoiced.</td></tr>
		<tr><td/> <td><B>AN INVOICE WILL BE SENT <U>AFTER</U> CONFIRMATION OF 
ORDER. DO <U>NOT</U> SEND CHECK IN ADVANCE.</B></td></tr>
		</table>
		</font>
		</div>
	</xsl:template>
</xsl:stylesheet>


Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.