[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to code XSL to display two XML elements side by side

Subject: RE: How to code XSL to display two XML elements side by side?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 27 Jun 2000 09:42:52 +0100
code xsl
> 	I have SoldTo and ShipTo info in XML that I need to display
> side-by-side in HTML.  I was using <table> HTML element to do 
> side-by-side
> displaying.  How can I code XSL to combine the two XML 
> elements, display one
> in the left and one in the right columns in the <table> 
> element?  

No magic here, just
<td><xsl:value-of select="soldto/lastname"/></td>
<td><xsl:value-of select="shipto/lastname"/></td>
and so on.

> 	Another question, I need to reuse the ShipTo info to 
> reprint it at bottom of the HTML.  How can I code XSL so that I can
> ShipTo info at bottom of the HTML page?
Several possibilities:
(a) just access the data a second time, using "pull" logic (xsl:for-each,
(b) process the data using xsl:apply-templates ("push" logic) and use a
different mode
(c) write a named template to do the formatted and call it from both places
(d) write a global variable to contain the formatted data as a result tree
fragment, and reference the variable from both places.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.