You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doc.xsl 1.3KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  3. <xsl:output method="xml" indent="yes"/>
  4. <xsl:template match="test">
  5. <fo:root>
  6. <fo:layout-master-set>
  7. <fo:simple-page-master master-name="one" page-height="29.7cm" page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="1.5cm" margin-right="1.5cm">
  8. <fo:region-before extent="1.5cm"/>
  9. <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
  10. <fo:region-after extent="1.5cm"/>
  11. </fo:simple-page-master>
  12. </fo:layout-master-set>
  13. <fo:page-sequence master-reference="one">
  14. <fo:flow font-size="10pt" line-height="10pt" flow-name="xsl-region-body">
  15. <xsl:apply-templates select="data"/>
  16. </fo:flow>
  17. </fo:page-sequence>
  18. </fo:root>
  19. </xsl:template>
  20. <xsl:template match="data">
  21. <xsl:apply-templates/>
  22. </xsl:template>
  23. <!-- note: this causes any node not otherwise defined to be copied -->
  24. <xsl:template match="@*|node()">
  25. <xsl:copy>
  26. <xsl:apply-templates select="@*|node()"/>
  27. </xsl:copy>
  28. </xsl:template>
  29. <xsl:template match="title">
  30. <xsl:apply-templates/>
  31. </xsl:template>
  32. </xsl:stylesheet>