p5dkp.audience.xsl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. exclude-result-prefixes="xs ditaarch"
  14. version="2.0">
  15. <!-- do sledzenia audience po mapie -->
  16. <xsl:template name="p5dkp:audience">
  17. <xsl:param name="audience"/>
  18. <xsl:param name="audience.attr"/>
  19. <audience>
  20. <xsl:for-each select="$audience/audience/key">
  21. <xsl:copy-of select="."/>
  22. </xsl:for-each>
  23. <xsl:for-each select="p5dkp:audience.attrs($audience.attr)"><key><xsl:copy-of select="." copy-namespaces="no"/></key></xsl:for-each>
  24. </audience>
  25. </xsl:template>
  26. <xsl:function name="p5dkp:audience.attrs">
  27. <xsl:param name="audience.attrs"/>
  28. <xsl:for-each select="$audience.attrs">
  29. <xsl:choose>
  30. <xsl:when test="name()='audience' or name()='product' or name()='otherprop'">
  31. <xsl:copy-of select="." copy-namespaces="no"/>
  32. </xsl:when>
  33. </xsl:choose>
  34. </xsl:for-each>
  35. </xsl:function>
  36. <xsl:function name="p5dkp:audience.init">
  37. <audience>
  38. <key/>
  39. </audience>
  40. </xsl:function>
  41. </xsl:stylesheet>