| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="xs"
- xmlns:default_db__x3A__NEURO_MIND_INPUT_TEXT="https://biuro.biall-net.pl/wfs/default_db/table/NEURO_MIND_INPUT_TEXT.xsd"
- xmlns:default_db__x3A__STRUCTURE="https://biuro.biall-net.pl/wfs/default_db/table/STRUCTURE.xsd"
- version="2.0">
-
-
- <xsl:import href="STRUCTURE.init.type.xsl"/>
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="xs:schema"> <!-- default_db__x3A__NEURO_MIND_INPUT_TEXT:init -->
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" required="yes"/>
- <xsl:param name="default_db__x3A__STRUCTURE:init.ref" required="yes"/>
- <xsl:param name="default_db__x3A__STRUCTURE:init.ref.name" required="yes"/>
- <xsl:comment>#18 add element refered=[<xsl:value-of select="$default_db__x3A__STRUCTURE:init.ref.name"/>] $ref=[<xsl:value-of select="$default_db__x3A__STRUCTURE:init.ref"/>]</xsl:comment>
- <xsl:variable name="default_db__x3A__STRUCTURE:loop.path" select="default_db__x3A__STRUCTURE:loop.path.test.append($default_db__x3A__STRUCTURE:loop.path,@targetNamespace,name())"/>
- <xsl:choose>
- <xsl:when test="$default_db__x3A__STRUCTURE:loop.path/*">
- <xsl:element name="{$default_db__x3A__STRUCTURE:init.ref}" namespace="{@targetNamespace}">
- <xsl:call-template name="default_db__x3A__STRUCTURE:generate-id"/>
- <!--<DEEBUG264>
- <xsl:copy-of select="*[name()=$default_db__x3A__STRUCTURE:init.ref.name and @name=default_db__x3A__STRUCTURE:prefix.clean($default_db__x3A__STRUCTURE:init.ref)]"></xsl:copy-of>
- </DEEBUG264>-->
- <xsl:choose>
- <xsl:when test="*[name()=$default_db__x3A__STRUCTURE:init.ref.name and @name=default_db__x3A__STRUCTURE:prefix.clean($default_db__x3A__STRUCTURE:init.ref)]">
- <xsl:apply-templates mode="#current" select="*[name()=$default_db__x3A__STRUCTURE:init.ref.name and @name=default_db__x3A__STRUCTURE:prefix.clean($default_db__x3A__STRUCTURE:init.ref)]">
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">#25 NOT FOUND *[name()=$default_db__x3A__STRUCTURE:init.ref.name and @name=default_db__x3A__STRUCTURE:prefix.clean($default_db__x3A__STRUCTURE:init.ref)]=[[[<xsl:value-of select="$default_db__x3A__STRUCTURE:init.ref"/>]]]</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:element>
- <xsl:copy>
- <xsl:call-template name="default_db__x3A__STRUCTURE:document-uri"/>
- <xsl:call-template name="default_db__x3A__STRUCTURE:generate-id"/>
- <xsl:attribute name="debug">#18 M[:init.ref] to migrate LC#[<xsl:value-of select="count($default_db__x3A__STRUCTURE:loop.path/*)"/>] </xsl:attribute>
- <xsl:copy-of select="$default_db__x3A__STRUCTURE:loop.path"/>
- <xsl:apply-templates mode="#current" >
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:copy>
-
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>#47 LOOP </xsl:comment>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="xs:element[@type]">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" required="yes"/>
- <xsl:variable name="default_db__x3A__STRUCTURE:loop.path" select="default_db__x3A__STRUCTURE:loop.path.test.append($default_db__x3A__STRUCTURE:loop.path,@type,name())"/>
- <xsl:comment>#59 test xs:element[@type] = <xsl:value-of select="@type"/>;</xsl:comment>
- <xsl:apply-imports>
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-imports>
- </xsl:template>
-
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match=" xs:import">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" required="yes"/>
- <xsl:copy>
- <xsl:call-template name="default_db__x3A__STRUCTURE:generate-id"/>
- <xsl:apply-templates mode="#current" select="@*"/>
- <xsl:apply-templates mode="#current" >
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="xs:complexType[@name='init' or @name='import' or @name='export']|xs:group[@name]|xs:simpleType[@name]">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" required="yes"/>
- <xsl:variable name="default_db__x3A__STRUCTURE:loop.path" select="default_db__x3A__STRUCTURE:loop.path.test.append($default_db__x3A__STRUCTURE:loop.path,@name,name())"/>
- <xsl:copy>
- <xsl:call-template name="default_db__x3A__STRUCTURE:generate-id"/>
- <xsl:apply-templates mode="#current" select="@*"/>
- <xsl:apply-templates mode="#current" >
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="xs:assert"/>
-
- <!--<xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="xs:simpleType">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" />
- <xsl:copy>
- <xsl:attribute name="debug">#40 migrate verify</xsl:attribute>
- <xsl:apply-templates mode="#current" select="@*"/>
- <xsl:apply-templates mode="default_db__x3A__STRUCTURE:init.ref">
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:copy>
-
- </xsl:template>-->
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="*">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" required="yes"/>
- <xsl:copy>
- <xsl:attribute name="debug">#61 default_db__x3A__STRUCTURE:init.ref [*]</xsl:attribute>
- <xsl:call-template name="default_db__x3A__STRUCTURE:generate-id"/>
- <xsl:apply-templates mode="#current" select="@*"/>
- <xsl:apply-templates mode="default_db__x3A__STRUCTURE:init.type" select="@type"/>
- <xsl:apply-templates mode="#current" >
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
-
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.type" match="@type">
- <xsl:param name="default_db__x3A__STRUCTURE:loop.path" />
-
- <xsl:apply-imports>
- <!--<xsl:with-param name="default_db__x3A__STRUCTURE:init.type" required="yes"/>
- <xsl:with-param name="default_db__x3A__STRUCTURE:init.type.name" required="yes"/>-->
- <xsl:with-param name="default_db__x3A__STRUCTURE:loop.path" select="$default_db__x3A__STRUCTURE:loop.path"/>
- </xsl:apply-imports>
-
- </xsl:template>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="@*">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template mode="default_db__x3A__STRUCTURE:init.ref" match="@default_db__x3A__STRUCTURE:generate-id">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- </xsl:stylesheet>
|