This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Table Building Problem


Is that what you want to have as output?

<table border="1">
	<tr>
		<td>Project</td>
		<td>Version</td>
	</tr>
	<tr>
		<td>First Module</td>
		<td>First Version</td>
	</tr>
</table>

Or more than this?

Meltem


-----Original Message-----
From: Jon Wynacht [mailto:jwynacht@cisco.com]
Sent: 24 April 2001 6:11 PM
To: XSL-List@lists.mulberrytech.com
Subject: [xsl] Table Building Problem


Hi,

I've run into some difficulty with creating a table based on two separate
trees of xml in the same document. The first one looks like this:

<ReportFields>
	<database>
		<table0>
			<record0>
				<FIELDNAME><![CDATA[Project]]></FIELDNAME>
			</record0>
			<record0>
				<FIELDNAME><![CDATA[Version]]></FIELDNAME>
			</record0>
		</table0>
	</database>
</ReportFields>

Note: There are more than just two record0/FIELDNAME values...there could be
as many as 20.

The next bit of xml looks like this:

	<Bug>
		<ProjectId>2042</ProjectId>
		<Id>11802</Id>
		<BugDesc>null</BugDesc>
		<Module>
			<Name>First Module</Name>
		</Module>
		<Version>
			<Name>First Version</Name>
		</Version>
		<Responsible>
			<FirstName>Jon</FirstName>
			<LastName>Wynacht</LastName>
		</Responsible>
		<Originator>
			<FirstName>Joseph</FirstName>
			<LastName>Stiehm</LastName>
		</Originator>
		<BugItem>
			<Name>Bug Count</Name>
			<ItemValue>10</ItemValue>
			<AvailableField>
				<ValueControl>FREE_FORM</ValueControl>
			</AvailableField>
		</BugItem>
		<BugItem>
			<Name>UglyBug?</Name>
			<ItemValue>Y</ItemValue>
			<AvailableField>
				<ValueControl>FREE_FORM</ValueControl>
			</AvailableField>
		</BugItem>
		<BugItem>
			<Name>Bug Color</Name>
			<ItemValue>1592</ItemValue>
			<AvailableField>
				<ValueControl>VALUE_LIST</ValueControl>
			</AvailableField>
			<ValueListElement>
				<ElementValue>Red</ElementValue>
			</ValueListElement>
		</BugItem>
		<BugItem>
			<Name>State</Name>
			<ItemValue>6544</ItemValue>
			<AvailableField>
				<ValueControl>VALUE_LIST</ValueControl>
			</AvailableField>
			<ValueListElement>
				<ElementValue>Dormant</ElementValue>
			</ValueListElement>
		</BugItem>
	</Bug>

What I need to do is create the column headings from the first bit of xml
and populate from the second bit of xml. Doing the first part is no problem,
populating the table, however, is a different animal altogether.

I've looked over xsl:key and thought that might be helpful, but I won't know
the values to insert into the key until the xml is generated.

Any ideas here? Help would definitely be appreciated and save me from
banging my head against the wall any further.

Thanks,

Jon

------------------------------
Jon Wynacht
Web Architect
ISBU Hardware Engineering
Cisco Systems
408-527-5261
jwynacht@cisco.com

"When the sureties of the present are defined, the mind races with the
possibilities of the future"


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]