bcgtht.tree_to_dita.import.xsl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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:gml="http://www.opengis.net/gml"
  5. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  6. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  7. xmlns:bcgtht="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/bocian-graph-to-html/bcgtht.xsd"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. xmlns:default_db__x3A__BI_audit_ENERGA_PRACOWNICY="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_PRACOWNICY"
  10. xmlns:p5="https://biuro.biall-net.pl/wfs"
  11. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row_object"
  12. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row"
  13. xmlns:default_db__x3A__BI_audit_KRS="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS"
  14. xmlns:default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI="https://biuro.biall-net.pl/wfs/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI"
  15. xmlns:default_db__x3A__BI_audit_MSIG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG"
  16. xmlns:default_db__x3A__BI_audit_CEIDG="https://biuro.biall-net.pl/wfs/default_db/BI_audit_CEIDG"
  17. xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
  18. xmlns:default_db__x3A__BI_audit_KRS_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_person"
  19. xmlns:default_db__x3A__BI_audit_taxpayer="https://biuro.biall-net.pl/wfs/default_db/BI_audit_taxpayer"
  20. xmlns:default_db__x3A__BI_audit_KRS_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_KRS_company"
  21. xmlns:default_db__x3A__BI_audit_MSIG_company="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_company"
  22. xmlns:default_db__x3A__TERYT_adresy="https://biuro.biall-net.pl/wfs/default_db/TERYT_adresy"
  23. xmlns:default_db__x3A__BI_audit_MSIG_person="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_person"
  24. xmlns:default_db__x3A__BI_audit_operational_raport_note="https://biuro.biall-net.pl/wfs/default_db/BI_audit_operational_raport_note"
  25. xmlns:default_db__x3A__BI_audit_MSIG_address="https://biuro.biall-net.pl/wfs/default_db/BI_audit_MSIG_address"
  26. xmlns:p5yed="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/yed/p5yed.xsd"
  27. exclude-result-prefixes="xs"
  28. version="2.0">
  29. <xsl:output indent="yes"/>
  30. <xsl:strip-space elements="*"/> <!-- -->
  31. <xsl:template mode="bcgtht:clousure.node.unique.descriptor.analys" match="bcgtht:clousure.node.unique.descriptor">
  32. <p5yed:node.unique.descriptor>
  33. <xsl:apply-templates mode="bcgtht:clousure.node.unique.descriptor.analys" select="@*"/>
  34. <xsl:apply-templates mode="#current"/>
  35. </p5yed:node.unique.descriptor>
  36. </xsl:template>
  37. <xsl:template mode="bcgtht:clousure.node.unique.descriptor.analys" match="*">
  38. <xsl:copy copy-namespaces="no">
  39. <xsl:apply-templates mode="bcgtht:clousure.node.unique.descriptor.analys" select="@*"/>
  40. <xsl:copy-of select="text()"/>
  41. </xsl:copy>
  42. </xsl:template>
  43. <xsl:template mode="bcgtht:clousure.node.unique.descriptor.analys" match="@bcgtht:clousure.node.unique.descriptor.text">
  44. <xsl:attribute name="p5yed:clousure.node.unique.descriptor.text" select="."/>
  45. </xsl:template>
  46. <xsl:template mode="bcgtht:clousure.node.unique.descriptor.analys" match="@bcgtht:clousure.node.unique.descriptor.not">
  47. <xsl:attribute name="p5yed:clousure.node.unique.descriptor.not" select="."/>
  48. </xsl:template>
  49. <xsl:template mode="bcgtht:clousure.node.unique.descriptor.analys" match="@bcgtht:clousure.node.unique.descriptor.group">
  50. <xsl:attribute name="p5yed:clousure.node.unique.descriptor.group" select="."/>
  51. </xsl:template>
  52. <!--<xsl:template mode="bcgtht:clousure.analys.merge.apply.rename.analys.import" match="path.clousure.following|path.included">
  53. <xsl:apply-templates mode="#current" select="@*"/>
  54. </xsl:template>-->
  55. <xsl:template mode="bcgtht:clousure.analys.merge.apply.rename.analys.import" match="path.clousure.following|path.included" > <!-- [@bcgtht:clousure.from and @p5:primaryKey and @bcgtht:clousure.from and @bcgtht:clousure.from.node.name and @bcgtht:clousure.from.node.primaryKey ] --> <!-- @bcgtht:clousure.node.name xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/yed/p5yed.xsd" -->
  56. <xsl:attribute name="p5yed:node" select="replace(@bcgtht:clousure.node_merged,'\.','_')"/>
  57. <xsl:attribute name="p5yed:node.nodegraphics.text" select="'todo text '"/>
  58. <xsl:attribute name="p5yed:node.nodegraphics.type" select="substring-before(@bcgtht:clousure.node_merged,'.')"/>
  59. <xsl:attribute name="p5yed:clousure.node" select="@bcgtht:clousure.node"/>
  60. <xsl:attribute name="p5yed:node.from.nodegraphics.type" select="@bcgtht:clousure.from_merged"/>
  61. <xsl:attribute name="p5yed:clousure.from.len" select="@bcgtht:clousure.from.len"/>
  62. <xsl:attribute name="p5yed:node.from.nodegraphics.text">
  63. <xsl:choose>
  64. <xsl:when test="@bcgtht:node.from.nodegraphics.text_merged"><xsl:value-of select="@bcgtht:node.from.nodegraphics.text_merged"/></xsl:when>
  65. <xsl:when test="bcgtht:clousure.node.unique.descriptor/*[@bcgtht:clousure.node.unique.descriptor.text]">
  66. <xsl:copy-of select="bcgtht:clousure.node.unique.descriptor/*[@bcgtht:clousure.node.unique.descriptor.text]/text()"/><xsl:text>
  67. </xsl:text><xsl:value-of select="substring-before(@bcgtht:clousure.from_merged,'.')"/><xsl:text>
  68. </xsl:text><xsl:value-of select="substring-after(@bcgtht:clousure.from_merged,'.')"/></xsl:when><xsl:otherwise>
  69. <xsl:value-of select="@bcgtht:clousure.from_merged"/><xsl:text>
  70. </xsl:text><xsl:value-of select="p5:primaryKey(@bcgtht:clousure.from_merged)"/></xsl:otherwise>
  71. </xsl:choose></xsl:attribute>
  72. <xsl:attribute name="p5yed:edge.source" select="replace(@bcgtht:clousure.from_merged,'\.','_')"/>
  73. </xsl:template>
  74. <xsl:template match="*|text()|comment()" mode="bcgtht:clousure.analys.merge.apply.rename.analys.import"/>
  75. <!-- #### --><!-- #### --><!-- #### -->
  76. <xsl:template mode="bcgtht:clousure.analys.merge.apply.test.merge.delete" match="@p5yed:clousure.node|@p5yed:edge.source">
  77. <xsl:attribute name="{name()}_deleted" select="."/>
  78. </xsl:template><!-- deleting objects -->
  79. <xsl:template mode="bcgtht:clousure.analys.merge.apply.test.merge.delete" match="@*">
  80. <xsl:copy-of select="."/>
  81. </xsl:template>
  82. <!--<xsl:template mode="bcgtht:clousure.analys.merge.apply.test.merge.delete" match="text()|comment()"/>-->
  83. <xsl:template mode="p5yed:node.attr" match="*[@bcgtht:clousure.from and @bcgtht:clousure.from ]" ><!-- @bcgtht:clousure.node.name xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/yed/p5yed.xsd" --><!-- and @p5:primaryKey and --> <!-- and @bcgtht:clousure.from.node.name and @bcgtht:clousure.from.node.primaryKey -->
  84. <xsl:attribute name="p5yed:node" select="concat(@bcgtht:clousure.node.name,'_',@p5:primaryKey)"/>
  85. <xsl:attribute name="p5yed:node.nodegraphics.text" select="@p5:primaryKey"/>
  86. <xsl:attribute name="p5yed:node.nodegraphics.type" select="@bcgtht:clousure.node.name"/>
  87. <xsl:attribute name="p5yed:clousure.node" select="@bcgtht:clousure.node"/>
  88. <xsl:attribute name="p5yed:node.from.nodegraphics.type" select="@bcgtht:clousure.from.node.name"/>
  89. <xsl:attribute name="p5yed:clousure.from.len" select="@bcgtht:clousure.from.len"/>
  90. <xsl:attribute name="p5yed:node.from.nodegraphics.text">
  91. <xsl:choose>
  92. <xsl:when test="bcgtht:clousure.node.unique.descriptor/*[@bcgtht:clousure.node.unique.descriptor.text]">
  93. <xsl:copy-of select="bcgtht:clousure.node.unique.descriptor/*[@bcgtht:clousure.node.unique.descriptor.text]/text()"/><xsl:text>
  94. </xsl:text><xsl:value-of select="@bcgtht:clousure.from.node.name"/><xsl:text>
  95. </xsl:text><xsl:value-of select="@bcgtht:clousure.from.node.primaryKey"/></xsl:when><xsl:otherwise>
  96. <xsl:value-of select="@bcgtht:clousure.from.node.name"/><xsl:text>
  97. </xsl:text><xsl:value-of select="@bcgtht:clousure.from.node.primaryKey"/></xsl:otherwise>
  98. </xsl:choose></xsl:attribute>
  99. <xsl:attribute name="p5yed:edge.source" select="concat(@bcgtht:clousure.from.node.name,'_',@bcgtht:clousure.from.node.primaryKey)"/>
  100. <!--<xsl:copy-of select="."/>-->
  101. </xsl:template>
  102. </xsl:stylesheet>