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

Building tables with optional data elements

Subject: Building tables with optional data elements
From: Grant Thiselton <grantt@xxxxxxxxxxxxx>
Date: Thu, 3 Oct 2002 11:19:05 +0200
building tables
Good Day,
I am attempting to convert the following XML into a table. Each column is
optional and the possibility is that one or more of the column data will be
missing in each row. 
I need to generate the table to include all the columns for each row, with
the data in the correct column. The actual structure includes up to 22
columns with some rows having only six data entries. 
I have managed to build a list of column names from each row, but I have not
managed to place the correct data in the correct column when a previous
column is missing. i.e. put a blank entry when the column is missing. 
How do I do this? 

Thanks

Grant Thiselton

Example XML:
<?xml version="1.0"?>
<Content>
  <Data>
    <Item>
	<NameValue>
	  <Name>Column1</Name><Value>A</Value>
	</NameValue>
	<NameValue>
	  <Name>Column2</Name><Value>B</Value>
	</NameValue>
      <NameValue>
	  <Name>Column3</Name><Value>C</Value>
	</NameValue>
  </Item>
  <Item>
	<NameValue>
	  <Name>Column1</Name><Value>X</Value>
	</NameValue>
	<NameValue>
	  <Name>Column3</Name><Value>Y</Value>
	</NameValue>
  </Item>
  <Item>
	<NameValue>
        <Name>Column3</Name><Value>z</Value>
	</NameValue>
  </Item>
</Data>
</Content>




"This e-mail may contain confidential information and may be legally
privileged and is intended only for the person to whom it is addressed. If
you are not the intended recipient, you are notified that you may not use,
distribute or copy this document in any manner whatsoever. Kindly also
notify the sender immediately by telephone, and delete the e-mail. When
addressed to clients of the company from where this e-mail originates ("the
sending company ") any opinion or advice contained in this e-mail is subject
to the terms and conditions expressed in any applicable terms of business or
client engagement letter . The sending company does not accept liability for
any damage, loss or expense arising from this e-mail and/or from the
accessing of any files attached to this e-mail." 

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.