XSL/XML Select and Option HTML tags

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi, I'm trying to render tabular data in an HTML document using XSL to
transform XML data into an HTML table. Some of the tabular data
appears as droplists (implemented by the HTML Select and Option tags).
All the droplists have the same option entries that a user can choose
from.

Is there anyway to reuse a single "master" branch in the XML document
that contains all the option entries for all the select droplists in
the XSL document? As there can be hundreds of skills, it wouldn't be
practical to keep repeating the option data as childnodes for each
skill node in the XML document.

The style sheet looks like:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/skills">


<TABLE>
<TR>
<TD>Skill</TD>
<TD>Expertise</TD>
</TR>

<xsl:apply-templates select="*">
</xsl:apply-templates>

</TABLE>
</xsl:template>

<!--END OF STYLE SHEET -->

<xsl:template name="list" match="skill">
<TR>
<TD><!-- skill name -->
<xsl:value-of select="current()" disable-output-escaping="yes"/>
</TD>
<TD> <!-- expertise droplist name -->
<SELECT>
<xsl:attribute name="ID"><xsl:value-of
select="concat('expertiseID_',position())"/></xsl:attribute>
<xsl:attribute name="NAME"><xsl:value-of
select="concat('expertiseNAME_',position())"/></xsl:attribute>
<OPTION></OPTION>
</SELECT></TD></TR>
</xsl:template>

</xsl:stylesheet>

.



Relevant Pages

  • Re: Help with styles and hot links
    ... Stop wanting that. ... It changes the font to Arial and sizes it correctly. ... fundamentally wrong _if_ you had tabular data with so many columns that it ... Well, you're wrong, and your question seems to revolve around CSS, not HTML, ...
    (comp.infosystems.www.authoring.html)
  • Re: Keep elements lined up?
    ... My raison d'être (in this context) ... data in html for sighted people. ... proper or essential sense of the word (tabular data table). ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: page layout, forms, etc.. Tables vs CSS
    ... the first HTML spec that contained already said: ... "HTML 3.2 includes a widely deployed subset of the specification given in RFC 1942 and can be used to markup tabular material or for layout purposes." ... If you wanted to programmatically recognize tabular data tables from layout tables, then a good rule of thumb is that the former usually contains at ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: CSS Positioning: 2 Column Blog Theme: Assorted: Newbie Questions
    ... What you have heard is probably based on the misconception that tabular data ... having been meant to be used as layout grids. ... That merely shows a fault in the originators of HTML, ... In some cases CSS can remedy the defect ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: OWC PivotList group by text field not working
    ... I'm pulling from an XML file...I've attached a simple example which shows ... > Are you pulling from tabular data or an OLAP cube? ...
    (microsoft.public.office.developer.web.components)