transformable.xsl 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:ui="http://dummy.com/mynamespace"
  5. xmlns="http://www.w3.org/1999/xhtml"
  6. xmlns:html="http://www.w3.org/1999/xhtml"
  7. version="1.0">
  8. <xsl:output method="html"
  9. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  10. doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes"/>
  11. <xsl:template match="ui:app">
  12. <form>
  13. <xsl:attribute name="action">
  14. <xsl:value-of select="@url" />
  15. </xsl:attribute>
  16. <xsl:apply-templates select="./*" />
  17. </form>
  18. </xsl:template>
  19. <xsl:template match="ui:someButton">
  20. <input type="submit">
  21. <xsl:attribute name="id">
  22. <xsl:value-of select="@id" />
  23. </xsl:attribute>
  24. <xsl:attribute name="name">
  25. <xsl:value-of select="@name" />
  26. </xsl:attribute>
  27. <xsl:attribute name="value">
  28. <xsl:value-of select="normalize-space(.)"/>
  29. </xsl:attribute>
  30. </input>
  31. </xsl:template>
  32. </xsl:stylesheet>