ivelin      2002/09/28 12:43:07

  Modified:    src/webapp/samples/stylesheets/xmlform xmlform2html.xsl
  Log:
  added support for xforms HINT and HELP tags,
  by Simon Price <[EMAIL PROTECTED]>
  and Konstantin Piroumian <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.4       +11 -4     
xml-cocoon2/src/webapp/samples/stylesheets/xmlform/xmlform2html.xsl
  
  Index: xmlform2html.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/webapp/samples/stylesheets/xmlform/xmlform2html.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xmlform2html.xsl  27 Sep 2002 02:52:45 -0000      1.3
  +++ xmlform2html.xsl  28 Sep 2002 19:43:06 -0000      1.4
  @@ -21,6 +21,8 @@
     author: Andrew Timberlake <[EMAIL PROTECTED]>, June 2002
     author: Michael Ratliff, [EMAIL PROTECTED] <[EMAIL PROTECTED]>, May 
2002
     author: Torsten Curdt, [EMAIL PROTECTED], March 2002
  +  author: Simon Price <[EMAIL PROTECTED]>, September 2002
  +  author: Konstantin Piroumian <[EMAIL PROTECTED]>, September 2002
   
   -->
   
  @@ -60,6 +62,7 @@
         <input name="{@ref}" type="textbox" value="{xf:value/text()}">
           <!-- copy all attributes from the original markup, except for "ref" -->
           <xsl:copy-of select="@*[not(name()='ref')]"/>
  +        <xsl:apply-templates select="xf:hint"/>
         </input>
      </xsl:template>
   
  @@ -67,6 +70,7 @@
      <xsl:template match="xf:textarea">
         <input name="{@ref}" type="textarea" value="{xf:value/text()}">
           <xsl:copy-of select="@*[not(name()='ref')]"/>
  +        <xsl:apply-templates select="xf:hint"/>
         </input>
      </xsl:template>
   
  @@ -74,6 +78,7 @@
      <xsl:template match="xf:password">
         <input name="{@ref}" type="password" value="{xf:value/text()}">
           <xsl:copy-of select="@*[not(name()='ref')]"/>
  +        <xsl:apply-templates select="xf:hint"/>
         </input>
      </xsl:template>
   
  @@ -91,6 +96,7 @@
             <xsl:if test="xf:value/text() = 'true'">
             <xsl:attribute name="checked"/>
           </xsl:if>
  +        <xsl:apply-templates select="xf:hint"/>
         </input>
      </xsl:template>
   
  @@ -169,8 +175,13 @@
          <!-- as a conventional Cocoon Action parameter of the form cocoon-action-* 
-->
         <input name="cocoon-action-{@id}" type="submit" value="{xf:caption/text()}">
           <xsl:copy-of select="@*[not(name()='id')]"/>
  +        <xsl:apply-templates select="xf:hint"/>
         </input>
      </xsl:template>
  +   
  +   <xsl:template match="xf:hint">
  +          <xsl:attribute name="title"><xsl:value-of select="."/></xsl:attribute>
  +   </xsl:template>
   
   
      <!-- copy all the rest of the markup which is not recognized above -->
  @@ -183,8 +194,4 @@
      </xsl:template>
   
   </xsl:stylesheet>
  -
  -
  -
  -
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to