Larry Brister
asked on
XSLT
I have an xslt which is working for the root
There are a TON of fields in the root...and a couple of child nodes for Education
My xml file starts of with <root>
Then a bunch of root nodes
So...my code starts of with this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="test.css"/>
</head>
<body>
<h5></h5>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="masterTable">
<tr>
<td></td>
</tr>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="root">
<DIV style="margin-bottom:20px; ">
<tr>
<td class="myTD">
<fieldset class="myFieldSet">
<legend class="legendTitle">Genera l Information</legend>
<table cellpadding="0" cellspacing="0" border="0" class="generalDescr">
<tr>
<td style="font-size:12px;">
<strong style="width:120px;">Name: </strong>& #160;<xsl: value-of select="FirstName"/>  <xsl:value -of select="MiddleInitial"/>&# 160;<xsl:v alue-of select="LastName"/> & #160;  ;  60;<strong >Goes by:</strong> <xsl:val ue-of select="PrefName"/>
</td>
</tr>
blah...blah...blah...
whole bunch of stuff that works...
I now have to put repeating child node information for
<root>
<Education>
<School>
<SchoolName>Delgado CC</SchoolName>
The following is not working...
No error...just no data
<tr>
<td style="width:150px;">
<xsl:value-of select="root/Education/Sch ool/School Name"/>
</td>
There are a TON of fields in the root...and a couple of child nodes for Education
My xml file starts of with <root>
Then a bunch of root nodes
So...my code starts of with this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="test.css"/>
</head>
<body>
<h5></h5>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="masterTable">
<tr>
<td></td>
</tr>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="root">
<DIV style="margin-bottom:20px;
<tr>
<td class="myTD">
<fieldset class="myFieldSet">
<legend class="legendTitle">Genera
<table cellpadding="0" cellspacing="0" border="0" class="generalDescr">
<tr>
<td style="font-size:12px;">
<strong style="width:120px;">Name:
</td>
</tr>
blah...blah...blah...
whole bunch of stuff that works...
I now have to put repeating child node information for
<root>
<Education>
<School>
<SchoolName>Delgado CC</SchoolName>
The following is not working...
No error...just no data
<tr>
<td style="width:150px;">
<xsl:value-of select="root/Education/Sch
</td>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome
ASKER
But I had to place it insode "for each"
Thanks for putting me in right direction