p5dkp.ditafiles.dita-ot.test-build-pdf.xsl 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  4. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  5. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  6. xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
  7. exclude-result-prefixes="xs"
  8. version="2.0">
  9. <xsl:output indent="yes"/>
  10. <xsl:strip-space elements="*"/>
  11. <xsl:include href="p5dkp.ditamap_to_reltable.filesuffix.xsl"/>
  12. <xsl:include href="../documentation_generator/p5dg.filepath.xsl"/>
  13. <xsl:template match="p5dkp:ditafiles.xml" mode="p5dkp:ditafiles.dita-ot.test-build-pdf.xml">
  14. <p5dkp:ditafiles.dita-ot.test-build-pdf.xml
  15. p5suis:group-desc="child::local-name()"
  16. p5suis:group.by="child::local-name()"
  17. p5suis:group.name="Lista map "
  18. p5suis:lang="PL"
  19. >
  20. <xsl:for-each-group select=".//p5dkp:ditafiles.file[@format = 'ditamap']" group-by="@p5dkp:true.path">
  21. <xsl:copy copy-namespaces="no">
  22. <xsl:apply-templates mode="#current" select="@*"/>
  23. <xsl:attribute name="dita-ot.args.input.ditamap.title.info">
  24. <xsl:for-each select="descendant-or-self::title">
  25. <xsl:choose>
  26. <xsl:when test="position() = 1"> mapa zawiera <xsl:value-of select="last()"/> dokumentów. </xsl:when>
  27. <xsl:when test="position() &lt; 10">
  28. <xsl:value-of select="substring(text(),0,40)"/>
  29. </xsl:when>
  30. <xsl:when test="position() = 11"> oraz innych <xsl:value-of select="last() - 11"/> tytułów </xsl:when>
  31. </xsl:choose>
  32. </xsl:for-each>
  33. </xsl:attribute>
  34. </xsl:copy>
  35. </xsl:for-each-group>
  36. </p5dkp:ditafiles.dita-ot.test-build-pdf.xml>
  37. </xsl:template>
  38. <!-- href="__ROOT_SubjectScheme__.ditamap"
  39. map.path="/Users/a.binder/procesy5-dita-templates-druki/"
  40. p5dkp:ditafiles.func.isditafile="true"
  41. id="ditafiles_d13e4"
  42. format="ditamap"
  43. scope="external-->
  44. <xsl:template match="@*" mode="p5dkp:ditafiles.dita-ot.test-build-pdf.xml"/>
  45. <xsl:template mode="p5dkp:ditafiles.dita-ot.test-build-pdf.xml" match="@p5dkp:true.path">
  46. <xsl:attribute name="dita-ot.args.input.input" select="p5dkp:to_reltable.filesuffix.ditaname(.)"/>
  47. <xsl:attribute name="dita-ot.args.input.input.filepath.dir" select="p5dg:filepath.dir(p5dkp:to_reltable.filesuffix.ditaname(.))"/>
  48. <xsl:attribute name="dita-ot.args.input.input.filename" select="p5dg:filename(p5dkp:to_reltable.filesuffix.ditaname(.))"/>
  49. <xsl:attribute name="dita-ot.args.input.input.filename.noext" select="p5dg:filename.noext(p5dkp:to_reltable.filesuffix.ditaname(.))"/>
  50. </xsl:template>
  51. <xsl:template mode="p5dkp:ditafiles.dita-ot.test-build-pdf.xml" match="@id">
  52. <!--<xsl:copy-of select="."/>-->
  53. </xsl:template>
  54. </xsl:stylesheet>