p5ant-interface.param.xsl 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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. exclude-result-prefixes="xs"
  6. version="2.0">
  7. <xsl:function name="p5ant-interface:param.if.istrue">
  8. <xsl:param name="param"/>
  9. <xsl:choose>
  10. <xsl:when test="$param='1'">
  11. <xsl:value-of select="true()"/>
  12. </xsl:when>
  13. <xsl:when test="$param='true'">
  14. <xsl:value-of select="true()"/>
  15. </xsl:when>
  16. <xsl:when test="$param='false'">
  17. <xsl:value-of select="true()"/>
  18. </xsl:when>
  19. <xsl:when test="$param='false()'"/>
  20. <xsl:when test="$param=''"/>
  21. <xsl:when test="$param='0'"/>
  22. <xsl:when test="contains($param,'${')">
  23. <xsl:message terminate="yes">#20 $param <xsl:value-of select="$param"/> is propapby set uncorrectly as expected !</xsl:message>
  24. </xsl:when>
  25. <xsl:when test="string-length($param) &gt; 0 ">
  26. <xsl:value-of select="true()"/>
  27. </xsl:when>
  28. </xsl:choose>
  29. </xsl:function>
  30. </xsl:stylesheet>