[xsl] Creating then using elements from xml table <row><entry> content?

Subject: [xsl] Creating then using elements from xml table <row><entry> content?
From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Wed, 29 Oct 2003 13:25:45 -0500
Hi. I've not found any references for this and would appreciate some help.
With what I've tried so far, I don't get errors BUT I don't get output

My xml source (created using an xml authoring tool) contains the following:

<table><tgroup cols="2">
<?PubTbl tgroup dispwid="6.78in"?>
<colspec colname="col1" colwidth="1.26*"/><colspec colname="col2"
<entry>Part Number</entry></row>
<row><entry>Operations Manual</entry><entry>092022-001</entry>
</row><row><entry>Machine Management System</entry>

In my stylesheet, I need to create parent/child elements from the table
content (excluding row 1), ex:

   Column 1 = <tool_mat>Operations Manual
   Column 2 =      <tool_partno>092022-001</tool_partno>

I then need to use those newly created elements in an html table. I have the
following xsl (the first template is just my feeble attempt):

<xsl:template match="tools_materials/table">    <!-- just trying to get the
first element -->
	<xsl:for-each select="row[position() != 1]">
                  <xsl:element name="tool_mat">
<xsl:template match="tools_materials">
     <table border="1" width="100%" cellpadding="4">
	<tr bgcolor="orange" valign="middle">
	    <th colspan="3" align="left">
	     <td colspan="2">
	     <td align="center">
		<b>Jabil Part No.</b>
	     <xsl:apply-templates select="tools_materials/table"/>
                 <xsl:apply-templates select="tool_mat"/>

<xsl:template match="tool_mat">
	     <td align="left" valign="top" width="60%">
		<table border="0">
		     <td align="left" valign="top">
		          <xsl:number level="single" format="1. "
count="tool_mat" />&#160;
		     <td align="left" valign="top">
			<xsl:value-of select="." />
	     <td align="left" valign="top" width="40%">
		<xsl:apply-templates select="tool_partno"/>

<xsl:template match="tool_partno">
		<xsl:when test="text()">
			<xsl:value-of select="."/>
		<xsl:apply-templates select="tool_partno"/>

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

Current Thread