[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] forms that span other elements
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|