p5dkp.ditafiles.wordindex.merged.ditafiles.topic.stats.xsl 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  5. xmlns:p5ant-interface="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd"
  6. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  7. exclude-result-prefixes="xs p5dkp p5ant-interface p5suis"
  8. version="2.0">
  9. <xsl:output indent="yes" method="xml" />
  10. <xsl:strip-space elements="*"/>
  11. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.texts">
  12. <xsl:param name="format" select="'li'"/>
  13. <xsl:element name="{$format}">
  14. Ciąg słowny:
  15. <ol>
  16. <!--<xsl:variable name="p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.texts">-->
  17. <!--<p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.texts>-->
  18. <xsl:for-each-group select="tokenize(.,' ')[string-length(.) &gt; 0 ]" group-by=".">
  19. <li><xsl:value-of select="."/> - <xsl:value-of select="count(current-group())"/></li>
  20. </xsl:for-each-group>
  21. <!--</p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.texts>-->
  22. <!--</xsl:variable>-->
  23. </ol>
  24. </xsl:element>
  25. </xsl:template>
  26. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="@p5ant-interface:dir.filename.remote">
  27. <xsl:param name="format" select="'li'"/>
  28. <xsl:element name="{$format}">
  29. Plik <xsl:value-of select="."/> <!-- p5dkp:ditafiles.dir_from_fullpath -->
  30. </xsl:element>
  31. </xsl:template>
  32. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.count">
  33. <xsl:param name="format" select="'li'"/>
  34. <xsl:element name="{$format}">
  35. Trafień <xsl:value-of select="."/>
  36. </xsl:element>
  37. </xsl:template>
  38. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.t.p.len.avg">
  39. <xsl:param name="format" select="'li'"/>
  40. <xsl:element name="{$format}">
  41. Trafień strukt/kontekst <xsl:value-of select="."/>
  42. </xsl:element>
  43. </xsl:template>
  44. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.ss.len.sum">
  45. <xsl:param name="format" select="'li'"/>
  46. <xsl:element name="{$format}">
  47. Trafień kontekstu zdań <xsl:value-of select="."/>
  48. </xsl:element>
  49. </xsl:template>
  50. <xsl:template mode="p5dkp:ditafiles.wordindex.merged.ditafiles.topic.xml" match="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.sum.text.len">
  51. <xsl:param name="format" select="'li'"/>
  52. <xsl:element name="{$format}">
  53. Długość pkrywającego sie ciągu znaków <xsl:value-of select="."/>
  54. </xsl:element>
  55. </xsl:template>
  56. <xsl:template mode="p5dkp:ditafiles.wordindex.merged.ditafiles.topic.xml" match="@*"/>
  57. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="HIT">
  58. <xsl:param name="format" select="'ol'"/>
  59. <xsl:choose>
  60. <xsl:when test="contains(@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.text,$p5dkp.ditafiles.wordindex.strings.merge.xml.minimize.s) or number(@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.ss.len.max) &lt; 4">
  61. <xsl:comment>#184 ignored "<xsl:value-of select="@p5dkp:ditafiles.wordindex.merge.ditafiles.hit.s.text"/>" due to minimize parameter</xsl:comment>
  62. </xsl:when>
  63. <xsl:otherwise>
  64. <xsl:element name="{$format}">
  65. <xsl:apply-templates mode="#current" select="@*">
  66. <xsl:with-param name="format" select="'li'"/>
  67. </xsl:apply-templates>
  68. </xsl:element>
  69. </xsl:otherwise>
  70. </xsl:choose>
  71. </xsl:template>
  72. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="comment()|text()"/>
  73. <xsl:template mode="p5dkp:ditafiles.wordindex.root.topic" match="*">
  74. <xsl:comment>#182 p5dkp:ditafiles.wordindex.root.topic/name() = <xsl:value-of select="name()"/>; </xsl:comment>
  75. </xsl:template>
  76. </xsl:stylesheet>