|
|
@@ -21,7 +21,18 @@
|
|
|
<xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:new_object_by_prototype">
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="$prototype_object_namespace and $new_object_namespace">
|
|
|
- <xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype"/>
|
|
|
+ <xsl:variable name="system_cache__appinfo:new_object_by_prototype_test_if_prototype">
|
|
|
+ <xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype_test_if_prototype"/>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$system_cache__appinfo:new_object_by_prototype_test_if_prototype/*">
|
|
|
+ <xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:message terminate="yes">#32 prototype <xsl:value-of select="$prototype_object_namespace"/> not exists in schema ! if it realy exiss consider rebuild procesy5_system_schema.xml !</xsl:message>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+
|
|
|
</xsl:when>
|
|
|
<xsl:otherwise><xsl:message terminate="yes">#25 not set required $prototype_object_namespace and $new_object_namespace params!</xsl:message></xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
@@ -31,6 +42,19 @@
|
|
|
<xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype"/>
|
|
|
</xsl:template>
|
|
|
|
|
|
+
|
|
|
+ <xsl:template mode="system_cache__appinfo:new_object_by_prototype_test_if_prototype" match="system_cache__appinfo:get_all_xsd">
|
|
|
+ <xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype_test_if_prototype"/>
|
|
|
+ </xsl:template>
|
|
|
+ <xsl:template mode="system_cache__appinfo:new_object_by_prototype_test_if_prototype" match="schema[@targetNamespace=$prototype_object_namespace]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
+ <system_cache__appinfo:new_object_by_prototype_test_if_prototype>exists_flag</system_cache__appinfo:new_object_by_prototype_test_if_prototype>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="system_cache__appinfo:new_object_by_prototype_test_if_prototype" match="*|text()|comment()"/>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<xsl:template mode="system_cache__appinfo:new_object_by_prototype" match="schema[@targetNamespace=$prototype_object_namespace]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
<xsl:variable name="prototype_TargetNamespaceBindings_from_Namespace">
|
|
|
<xsl:call-template name="system_cache__appinfo:TargetNamespaceBindings_from_Namespace">
|
|
|
@@ -97,7 +121,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <xsl:template mode="system_cache__appinfo:new_object_by_prototype_schema_root" match="element|complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
+ <xsl:template mode="system_cache__appinfo:new_object_by_prototype_schema_root" match="element|complexType|simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
<xsl:param name="prototype_TargetNamespaceBindings_from_Namespace" required="yes"/>
|
|
|
<xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>
|
|
|
<xsl:param name="prototype_NamespacePrefix" required="yes"/>
|
|
|
@@ -107,7 +131,7 @@
|
|
|
<xsl:with-param name="new_TargetNamespaceBindings_from_Namespace" select="$new_TargetNamespaceBindings_from_Namespace"/>
|
|
|
<xsl:with-param name="prototype_NamespacePrefix" select="$prototype_NamespacePrefix"/>
|
|
|
</xsl:apply-templates>
|
|
|
- <xsl:attribute name="id" select="concat(substring($new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,0,8),'_', substring(replace(@name,$prototype_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,$new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable),0,5),'_',generate-id())"/>
|
|
|
+ <!--<xsl:attribute name="id" select="concat(substring($new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,0,8),'_', substring(replace(@name,$prototype_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,$new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable),0,5),'_',generate-id())"/>-->
|
|
|
<!--<xsl:attribute name="name" select=" replace(@name,$prototype_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,'InfrastructureAAAA')"/>-->
|
|
|
<xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype_schema_child">
|
|
|
<xsl:with-param name="prototype_TargetNamespaceBindings_from_Namespace" select="$prototype_TargetNamespaceBindings_from_Namespace"/>
|
|
|
@@ -122,7 +146,7 @@
|
|
|
<xsl:param name="new_TargetNamespaceBindings_from_Namespace" required="yes"/>
|
|
|
<xsl:param name="prototype_NamespacePrefix" required="yes"/>
|
|
|
<xsl:element name="{name()}">
|
|
|
- <xsl:attribute name="id" select="concat(substring($new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,0,15),'_',generate-id())"/>
|
|
|
+ <!--<xsl:attribute name="id" select="concat(substring($new_TargetNamespaceBindings_from_Namespace//@NamespaceObjectInstanceTable,0,15),'_',generate-id())"/>-->
|
|
|
<xsl:apply-templates mode="system_cache__appinfo:new_object_by_prototype_schema_child">
|
|
|
<xsl:with-param name="prototype_TargetNamespaceBindings_from_Namespace" select="$prototype_TargetNamespaceBindings_from_Namespace"/>
|
|
|
<xsl:with-param name="new_TargetNamespaceBindings_from_Namespace" select="$new_TargetNamespaceBindings_from_Namespace"/>
|
|
|
@@ -228,4 +252,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</xsl:stylesheet>
|