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.

33 lines
916 B

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <xsl:param name="id"/>
  4. <xsl:template match="/">
  5. <xsl:apply-templates/>
  6. </xsl:template>
  7. <xsl:template match="book">
  8. <group title="{group[attribute::id=$id]/@label}">
  9. <xsl:apply-templates select="group[attribute::id=$id]/entry"/>
  10. </group>
  11. </xsl:template>
  12. <xsl:template match="entry">
  13. <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}">
  14. <xsl:apply-templates select="document(concat('sbk:/sources/',@source))/faqs/faq"/>
  15. </entry>
  16. </xsl:template>
  17. <xsl:template match="faq">
  18. <voice>
  19. <xsl:if test="string-length(@title)=0">
  20. <xsl:value-of select="q"/>
  21. </xsl:if>
  22. <xsl:if test="string-length(@title)>0">
  23. <xsl:value-of select="@title"/>
  24. </xsl:if>
  25. </voice>
  26. </xsl:template>
  27. </xsl:stylesheet>