p5dkp.dita.xsl 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. exclude-result-prefixes="xs"
  11. version="2.0">
  12. <xsl:output indent="yes"/>
  13. <xsl:strip-space elements="*"/>
  14. <xsl:template mode="p5dkp:dita" match="topicref">
  15. <xsl:message terminate="no">#124 !!!!!!!!!!!!!! error - not allowed to be topicref structurized at the moment
  16. <xsl:copy copy-namespaces="no">
  17. <xsl:copy-of select="@*" copy-namespaces="no"/>
  18. </xsl:copy>
  19. </xsl:message>
  20. </xsl:template>
  21. <xsl:template mode="p5dkp:dita" match="keydef">
  22. <xsl:param name="keyscope"/>
  23. <xsl:param name="type"/>
  24. <xsl:if test="number($debug) &gt; 3">
  25. <xsl:message>#32A keydef for
  26. <xsl:copy copy-namespaces="no">
  27. <xsl:copy-of select="@*" copy-namespaces="no"/>
  28. val:<xsl:value-of select="topicmeta//keyword/text()"/>
  29. </xsl:copy>
  30. </xsl:message>
  31. </xsl:if>
  32. <xsl:element name="{@keys}">
  33. <xsl:choose>
  34. <xsl:when test="@keys = $type">
  35. <xsl:attribute name="p5dkp:id" select="concat(tokenize( $keyscope , ' ')[1],'.',@keys)"/>
  36. </xsl:when>
  37. </xsl:choose>
  38. <xsl:copy-of select="@keyref"/>
  39. <xsl:copy-of select="@href"/>
  40. <xsl:value-of select="topicmeta//keyword/text()"/>
  41. </xsl:element>
  42. </xsl:template>
  43. <xsl:template mode="p5dkp:dita" match="keydef[ not(topicmeta)]">
  44. <xsl:message>#51 probably p5dkp:fix-topic / keydef - ignoring</xsl:message>
  45. </xsl:template>
  46. <xsl:template mode="p5dkp:dita" match="*">
  47. <xsl:comment>#55 ignored <xsl:value-of select="name()"/> , <xsl:value-of select="@*"/></xsl:comment>
  48. </xsl:template>
  49. <xsl:template mode="p5dkp:dita" match="text()|comment()"/>
  50. </xsl:stylesheet>