Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with attributes.
Message
 
General information
Forum:
Internet
Category:
XML
Miscellaneous
Thread ID:
00415090
Message ID:
00415098
Views:
27
Oops!! Should have put pre tags in after changing all < and > in tags to lt and gt codes. :) Here is a cleaner version.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="drilllist.xsl"?>
<table name = 'Deployment' id='DeploymentID' default='Deployment'>
   <record>
      <field name='DeploymentID'>1</field>
      <field name='Deployment'>LAN</field>
   </record>
   <record>
      <field name='DeploymentID'>2</field>
      <field name='Deployment'>WAN</field>
   </record>
   <record>
      <field name='DeploymentID'>3</field>
      <field name='Deployment'>Internet</field>
   </record>
   <record>
      <field name='DeploymentID'>4</field>
      <field name='Deployment'>Stand Alone</field>
   </record>
   <record>
      <field name='DeploymentID'>5</field>
      <field name='Deployment'>Mainframe</field>
   </record>
   <record>
      <field name='DeploymentID'>6</field>
      <field name='Deployment'>Dial-In</field>
   </record>
</table>
my XSL style sheet is this:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
   <xsl:template match="/">
      <html><head><title>TITLE</title></head>
      <body>
         <xsl:apply-templates/>
      </body>
      </html>
   </xsl:template>

   <xsl:template match="table">
      <select multiple="multiple">
         <xsl:apply-templates/>
      </select>
   </xsl:template>

   <xsl:template match="record">
      <option value=""><xsl:value-of select="<A HREF=mailto:field[@name=table:default]>field[@name=table:default]</A>"/></option>
   </xsl:template>
</xsl:stylesheet>
the problem is this:
   <xsl:template match="record">
      <option value="<xsl:value-of select="<A HREF=mailto:field[@name=table:id]>field[@name=table:id]</A>"/>"><xsl:value-of select="<A HREF=mailto:field[@name=table:default]>field[@name=table:default]</A>"/></option>
   </xsl:template>
I realize this template isn't right but if I write it like this I think you can see what I am trying to do. Basically I need the value of the ID field for each as the option value and the default field of each to be the text shown.

In the html select statement (table element) I also want its name and id to be the same as the tables name.

Plz help me. TIA and Cya.
Previous
Reply
Map
View

Click here to load this message in the networking platform