This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: <go> element needs to be nested


At 03:06 PM 4/16/2002, you wrote:
>I am using the XSLT below to transform an XHTML form to a wml form.  The
>problem with this is that it neglects the href.
>
><xsl:template match="form">
>   <xsl:apply-templates select="input" />
>  </xsl:template>
>
><xsl:template match="input">
>   <input>
>     <xsl:copy-of select="@name | @size | @maxlength" />
>   </input>
></xsl:template>
>
><xsl:template match="input[@type = 'submit']">
>   <do type="accept" label="{normalize-space(@value)}"/>
></xsl:template>
>
>
>The proper wml input would be as follows:
>
><input name="" size="" maxlength=""/>
><do type="accept" label="">
><go href=""/>
></do>
>
>
>I don't know how to put the <go> element into the transformation.  I
>believe that it would have to be inside of the <do> element.  I don't
>know how to do this without getting a parser error.  Any suggestions?

   What about this?

<xsl:template match="input[@type = 'submit']">
   <do type="accept" label="{normalize-space(@value)}">
     <go href=""/>
   </do>
</xsl:template>

   You didn't include the XHTML form source, so I'm not sure what the input 
looks like.  The above would output what you specified though.  Outputed 
elements do not have to be empty.


Greg Faron
Integre Technical Publishing Co.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]