gns-form.xslt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <xsl:output method="html" indent="yes" />
  4. <xsl:template match="form">
  5. <html>
  6. <head>
  7. <title>Create your GNU Name System Business Card</title>
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
  9. <link href="bootstrap.min.css" rel="stylesheet" />
  10. </head>
  11. <body>
  12. <!--<script src="js/jquery-2.0.3.min.js"></script>-->
  13. <!--<script src="js/bootstrap.min.js"></script>-->
  14. <div class="container">
  15. <h1>GNU Name System Business Card</h1>
  16. <p>
  17. Please fill in the information below to generate your business card.
  18. </p>
  19. <form class="form-horizontal" name="gnsinput" action="submit.pdf" method="get" accept-charset="utf-8">
  20. <xsl:apply-templates />
  21. <div class="form-group">
  22. <div class="col-sm-offset-2 col-sm-10">
  23. <input class="btn btn-submit" type="submit" />
  24. </div>
  25. </div>
  26. </form>
  27. </div>
  28. </body>
  29. </html>
  30. </xsl:template>
  31. <xsl:template match="group">
  32. <fieldset>
  33. <legend><!--<xsl:value-of select="@title" />--></legend>
  34. <xsl:apply-templates />
  35. </fieldset>
  36. </xsl:template>
  37. <xsl:template match="field">
  38. <div class="form-group">
  39. <label class="col-sm-2 control-label" for="{@id}"><xsl:value-of select="." />:</label>
  40. <div class="col-sm-10">
  41. <input class="col-sm-10 form-control" id="{@id}" name="{@id}" type="text" />
  42. </div>
  43. </div>
  44. </xsl:template>
  45. </xsl:transform>