mysl_xml_to_mysql.xsl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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:system_cache__procesy5_xsd_business_objects="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/procesy5_xsd_business_objects.xsd"
  5. exclude-result-prefixes="xs system_cache__procesy5_xsd_business_objects"
  6. version="2.0">
  7. <xsl:output method="xml" indent="yes" exclude-result-prefixes="system_cache__procesy5_xsd_business_objects"/>
  8. <xsl:template match="system_cache__procesy5_xsd_business_objects:resource" >
  9. Insert into CRM_LISTA_ZASOBOW ( `ID`,`PARENT_ID`,`TYPE`,`ALIAS_ID`,`DESC`, `OPIS`) values
  10. ('<xsl:value-of select="system_cache__procesy5_xsd_business_objects:path"></xsl:value-of>',
  11. '<xsl:value-of select="system_cache__procesy5_xsd_business_objects:resource_parent_id"/>'
  12. <xsl:for-each select="system_cache__procesy5_xsd_business_objects:resource_type/child::node()">
  13. <xsl:if test="name()">
  14. ,'<xsl:value-of select="replace(name(),'system_cache__procesy5_xsd_business_objects:','')"/>'
  15. <xsl:choose>
  16. <xsl:when test="system_cache__procesy5_xsd_business_objects:alias_id">
  17. ,'<xsl:value-of select="system_cache__procesy5_xsd_business_objects:alias_id"/>'
  18. </xsl:when>
  19. <xsl:otherwise>
  20. ,''
  21. </xsl:otherwise>
  22. </xsl:choose>
  23. ,'<xsl:value-of select="replace(name(),'system_cache__procesy5_xsd_business_objects:','')"/>'
  24. </xsl:if>
  25. </xsl:for-each>
  26. ,'<xsl:value-of select="system_cache__procesy5_xsd_business_objects:annotation_documentation"/>');
  27. </xsl:template>
  28. </xsl:stylesheet>