p5ant-interface.filename.ifexists.xsl 1.2 KB

12345678910111213141516171819202122232425262728
  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:p5ant-interface="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd"
  5. xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
  6. exclude-result-prefixes="xs"
  7. version="2.0">
  8. <xsl:output indent="yes"/>
  9. <xsl:strip-space elements="*"/>
  10. <xsl:function name="p5ant-interface:filename.ifexists">
  11. <xsl:param name="p5ant-interface:filepath"/>
  12. <xsl:param name="p5ant-interface.filelist.xml.dir"/>
  13. <xsl:choose>
  14. <xsl:when test="doc($p5ant-interface.filelist.xml.dir)//p5ant-interface:dir.filename[ text() = $p5ant-interface:filepath]">
  15. <xsl:value-of select="true()"/>
  16. </xsl:when>
  17. <xsl:otherwise>
  18. <xsl:message>#21 file not found <xsl:value-of select="$p5ant-interface:filepath"/></xsl:message>
  19. </xsl:otherwise>
  20. </xsl:choose>
  21. </xsl:function>
  22. </xsl:stylesheet>