p5oi.statistics.xsl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:p5oi="http://biuro.biall-net.pl/WPS_Functions/object_install_se_ant_object/object_install_se_ant_object.xsd"
  5. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  6. exclude-result-prefixes="xs"
  7. version="2.0">
  8. <xsl:output omit-xml-declaration="yes"/>
  9. <xsl:template mode="p5oi:statistics" match="text()|comment()"/>
  10. <xsl:template mode="p5oi:statistics" match="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
  11. <p5oi:statistics>
  12. <p5oi:counts>
  13. <xsl:for-each-group select="*[not( matches(name(),'(DEB.*)|(.*DEB)'))]" group-by="name()">
  14. <xsl:element name="{name()}">
  15. <xsl:value-of select=" count(current-group())"/>
  16. </xsl:element>
  17. </xsl:for-each-group>
  18. </p5oi:counts>
  19. <xsl:choose>
  20. <xsl:when test="*[ matches(name(),'(DEB.*)|(.*DEB)')]">
  21. <p5oi:debug>
  22. <xsl:value-of select="'used DEBUG. Turn debug off for complete process '"/>
  23. </p5oi:debug>
  24. </xsl:when>
  25. </xsl:choose>
  26. </p5oi:statistics>
  27. </xsl:template>
  28. <xsl:template mode="p5oi:say" match="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
  29. <xsl:variable name="p5oi:statistics">
  30. <xsl:apply-templates mode="p5oi:statistics" select="."/>
  31. </xsl:variable>
  32. <!--<xsl:copy-of select="$p5oi:statistics"></xsl:copy-of>-->
  33. <xsl:apply-templates select="$p5oi:statistics" mode="p5oi:say"/>
  34. </xsl:template>
  35. <xsl:template mode="p5oi:say" match="p5oi:statistics">
  36. We generated for:
  37. <xsl:for-each select="p5oi:counts/*">
  38. <xsl:value-of select="name()"/><xsl:text> </xsl:text><xsl:value-of select="text()"/><xsl:text> , </xsl:text>
  39. </xsl:for-each>
  40. <xsl:copy-of select="p5oi:debug/text()"/>
  41. </xsl:template>
  42. </xsl:stylesheet>