[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

forms that span other elements

Subject: forms that span other elements
From: "Jacob P. Glenn" <jpglenn2@xxxxxxxxxxx>
Date: Mon, 22 Apr 2002 03:44:33 -0400
the element of form
Thanx to everyone who helped with my last problem, because of you I was
able to fix it.  My new problem is as follows.  My stylesheet is working
great for most of my conversions.  But I have come across a few files
with forms that span several elements for example:

<body>

<form action="bla" method="get"><input type="hidden" value="T"
name="TypeOfInquiryNumber" /> 
<table cellspacing="0" cellpadding="0" width="600" border="0">
<tbody>
.
.
.
<tr>
<td>1.</td>
<td><input maxlength="48" size="24" name="InquiryNumber1" /></td>
</tr>
.
.
.
</tbody>
</table>
</form>
</body>

The way my stylesheet is set up is with a template for each element.
The form element is as follows.  In writing the form element I did not
anticipate this problem but at the same time I am at a loss for a
solution.  How can I do this?  What happens now is that it omits
everything within the form element.  The form template is below:


<xsl:template match="form">	 <!-- Form template to convert XHTML
forms to WML input elements -->
       <xsl:apply-templates select="input" >
            <!-- Capture the link value for later use -->
            <xsl:with-param name='href' select='@action'/>
       </xsl:apply-templates>
</xsl:template>

<xsl:template match="input">
   <input>
     <xsl:copy-of select="@name | @size | @maxlength" />
   </input>
</xsl:template>

<xsl:template match="input[@type = 'submit']">  <!-- Form with submit
type-->
    <!-- Recover the link value using the parameter -->
    <xsl:param name='href'/>
   <do type="accept" label="{normalize-space(@value)}">
        <!-- Go to the specified URL-->
        <go href='{$href}'/>
    </do>
 </xsl:template>
 
 <xsl:template match="input[@type = 'image']">  <!-- Form with image
type-->
    <!-- Recover the link value using the parameter -->
    <xsl:param name='href'/>
   <do type="accept" label="{normalize-space(@alt)}">
        <!-- Go to the specified URL -->
        <go href='{$href}'/>
    </do>
 </xsl:template>

Thank you,

Jacob

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.