p5dkp.ditafiles.loop.xsl 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  5. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  6. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  7. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  9. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  10. xmlns:p5xsda="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd"
  11. xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
  12. xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
  13. xmlns:p5ant-interface="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd"
  14. exclude-result-prefixes="xs"
  15. version="2.0">
  16. <!--<xsl:key name="p5dkp:ditafiles.file" match="p5dkp:ditafiles/file"></xsl:key>-->
  17. <xsl:template name="p5dkp:ditafiles">
  18. <xsl:param name="p5dkp:ditafiles"/>
  19. <xsl:param name="p5dkp:true.path" required="yes"/>
  20. <p5dkp:ditafiles>
  21. <xsl:if test="$p5dkp:ditafiles"><xsl:copy-of select="$p5dkp:ditafiles/p5dkp:ditafiles/*" copy-namespaces="no"/></xsl:if>
  22. <!--<xsl:element name="file" xml:id="{replace($p5dkp:true.path,'/','')}" >
  23. <xsl:value-of select="replace($p5dkp:true.path,'/','')"/>
  24. </xsl:element>-->
  25. <file xml:id="{replace($p5dkp:true.path,'/','')}" >
  26. <xsl:value-of select="replace($p5dkp:true.path,'/','')"/>
  27. </file>
  28. </p5dkp:ditafiles>
  29. </xsl:template>
  30. <!--<xsl:template name="p5dkp:ditafiles.init">
  31. <xsl:param name="p5dkp:ditafiles"/>
  32. <xsl:param name="p5dkp:true.path" required="yes"/>
  33. <p5dkp:ditafiles>
  34. <xsl:if test="$p5dkp:ditafiles"><xsl:copy-of select="$p5dkp:ditafiles/p5dkp:ditafiles/*" copy-namespaces="no"/></xsl:if>
  35. <!-\-<xsl:element name="file" xml:id="{replace($p5dkp:true.path,'/','')}" >
  36. <xsl:value-of select="replace($p5dkp:true.path,'/','')"/>
  37. </xsl:element>-\->
  38. <file xml:id="__INIT__" >
  39. <xsl:value-of select="'__INIT__'"/>
  40. </file>
  41. </p5dkp:ditafiles>
  42. </xsl:template>-->
  43. <!--KKKEY <xsl:function name="p5dkp:ditafiles" >
  44. <xsl:param name="p5dkp:true.path"/>
  45. <xsl:param name="p5dkp:ditafiles"/>
  46. <xsl:choose>
  47. <xsl:when test="$p5dkp:ditafiles//file[ text() = replace($p5dkp:true.path,'/','') ][2]">
  48. <xsl:message terminate="no">#777333-AAA - p5dkp:ditafiles LOOP for $p5dkp:true.path <xsl:value-of select="$p5dkp:true.path"/>; </xsl:message>
  49. <xsl:value-of select="true()"/>
  50. </xsl:when>
  51. <xsl:otherwise>
  52. <xsl:message terminate="no">#777333-BBB - p5dkp:ditafiles LOOP count =<xsl:value-of select="count($p5dkp:ditafiles//file[ text() = replace($p5dkp:true.path,'/','') ])"/> for $p5dkp:true.path <xsl:value-of select="$p5dkp:true.path"/>; </xsl:message>
  53. <!-\-<xsl:value-of select="tra"/>-\->
  54. </xsl:otherwise>
  55. </xsl:choose>
  56. </xsl:function>-->
  57. <xsl:function name="p5dkp:ditafiles">
  58. <xsl:param name="p5dkp:true.path"/>
  59. <xsl:param name="p5dkp:ditafiles"/>
  60. <xsl:choose>
  61. <xsl:when test="$p5dkp:ditafiles//file/id(replace($p5dkp:true.path,'/',''))">
  62. <xsl:message terminate="no">#777333-AAA-KKKEY--LOOP_ID - p5dkp:ditafiles LOOP for $p5dkp:true.path <xsl:value-of select="$p5dkp:true.path"/>; </xsl:message>
  63. <xsl:value-of select="true()"/>
  64. </xsl:when>
  65. <!--<xsl:when test="$p5dkp:ditafiles//file[ text() = replace($p5dkp:true.path,'/','') ]">
  66. <xsl:message terminate="no">#777333-AAA-KKKEY-\-LOOP - p5dkp:ditafiles LOOP for $p5dkp:true.path <xsl:value-of select="$p5dkp:true.path"/>; </xsl:message>
  67. <xsl:value-of select="true()"/>
  68. </xsl:when>-->
  69. <xsl:otherwise>
  70. <xsl:message terminate="no">#777333-BBB-KKKEY--NOT_LOOP - p5dkp:ditafiles LOOP count =<xsl:value-of select="count($p5dkp:ditafiles//file[ text() = replace($p5dkp:true.path,'/','') ])"/> for $p5dkp:true.path <xsl:value-of select="$p5dkp:true.path"/>; </xsl:message>
  71. <!--<xsl:value-of select="tra"/>-->
  72. </xsl:otherwise>
  73. </xsl:choose>
  74. </xsl:function>
  75. </xsl:stylesheet>