| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p5xsda="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd"
- xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
- xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
- xmlns:p5dkp.entities-generated="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd"
- xmlns:p5dkp.entities.submodel="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.submodel.xsd"
- xmlns:p5dkp.entities="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.xsd"
- xmlns:p5dkp-er="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-relations.xsd"
- xmlns:p5frc="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/flat_relation_cache/p5frc.xsd"
- exclude-result-prefixes="xs ditaarch"
- version="2.0">
-
- <!-- Do robienia modelu cechy i jego obslugiwania w systemie -->
-
- <!-- template to generate from p5dkp.entities.XXXX.xsd
- and controll them
- -->
-
- <xsl:include href="p5dkp.entities.param.xsl"/>
-
-
-
-
- <xsl:output indent="yes" method="xml" exclude-result-prefixes="ditaarch"/>
- <!--<xsl:output indent="yes" method="xml" standalone="no" doctype-public="-//OASIS//DTD DITA Glossary Group//EN" doctype-system="glossgroup.dtd"/>-->
- <xsl:strip-space elements="*"/>
-
-
-
-
-
-
- <!--<xsl:param name="p5dkp.entities:xsd" required="yes"/>-->
- <!--<xsl:param name="p5dkp.repository" required="yes"/>--> <!-- will output there -->
- <!--<xsl:param name="p5dkp.entities-generated:xsd" required="yes"/>-->
- <!--<xsl:param name="p5dkp.entities-generated.xsd.p5frc.build_complexType.xml" required="yes"/>-->
-
- <!--<xsl:param name="p5dkp-er:xsd" required="yes"/>-->
-
-
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.name"/><!-- np prio -->
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.model" select="concat('entities.',$p5dkp.entities.submodel:specialize.entity.name)"/><!-- np entities.basic domyslnie .name -->
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.simpleType" select="'xs:string'"/> <!-- like xs:string -->
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.derive"/> <!-- np. dla potrzeb specjalizacji -->
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.pointer"/> <!-- TODO np. dla potrzeb do czego dane entity-->
-
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.prefix" select="p5dkp.entities.submodel:specialize.entity.prefix($p5dkp.entities:prefix,$p5dkp.entities.submodel:specialize.entity.name)"/>
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.targetNamespace" select="p5dkp.entities.submodel:specialize.entity.targetNamespace($p5dkp.entities:targetNamespace,$p5dkp.entities.submodel:specialize.entity.name)"/>
-
-
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.name.complexType" select="p5dkp.entities.submodel:specialize.entity.name.complexType($p5dkp.entities.submodel:specialize.entity.name)"/><!-- np entities__x3A___prio -->
-
- <!--<xsl:include href="p5dkp.entities-generated.functions.xsl"/>-->
- <!--<xsl:include href="../flat_relation_cache/p5frc.build_complexType.xsl"/>-->
-
- <xsl:function name="p5dkp.entities.submodel:specialize.entity.name.complexType">
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.name"/>
- <xsl:value-of select="concat('entities__x3A___',$p5dkp.entities.submodel:specialize.entity.name)"/>
- </xsl:function>
-
- <xsl:function name="p5dkp.entities.submodel:specialize.entity.prefix">
- <xsl:param name="p5dkp.entities:prefix"/>
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.name"/>
- <xsl:value-of select="concat($p5dkp.entities:prefix,'.',$p5dkp.entities.submodel:specialize.entity.name)"/>
- </xsl:function>
-
- <xsl:function name="p5dkp.entities.submodel:specialize.entity.targetNamespace">
- <xsl:param name="p5dkp.entities:targetNamespace"/>
- <xsl:param name="p5dkp.entities.submodel:specialize.entity.name"/>
- <xsl:value-of select="concat(replace($p5dkp.entities:targetNamespace,'(.xsd$)',''),'.',$p5dkp.entities.submodel:specialize.entity.name,'.xsd')"/>
- </xsl:function>
-
- <!-- {http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.submodel.xsd}specialize -->
-
- <xsl:template mode="p5dkp.entities.submodel:specialize p5dkp.entities.submodel:specialize.complexType p5dkp.entities.submodel:specialize.simpleType p5dkp.entities.submodel:specialize.documentation p5dkp.entities.submodel:specialize.group.model p5dkp.entities.submodel:specialize.group.entities" match="*|text()|comment()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:template mode="p5dkp.entities.submodel:specialize" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xs:schema>
- <xsl:namespace name="{$p5dkp.entities.submodel:specialize.entity.prefix}" select="$p5dkp.entities.submodel:specialize.entity.targetNamespace"/>
- <xsl:copy-of select="namespace::*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:copy-of select="@vc:minVersion"/>
- <xsl:attribute name="targetNamespace" select="$p5dkp.entities.submodel:specialize.entity.targetNamespace"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.group.model" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.group.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xs:schema>
- </xsl:template>
-
-
- <xsl:template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="force.documentation" select="'Generated by p5dkp.entities.submodel:specialize'"/>
- <xsl:choose>
- <xsl:when test="annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:with-param name="force.documentation" select="$force.documentation"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xs:annotation>
- <xs:documentation><xsl:value-of select="$force.documentation"/></xs:documentation>
- </xs:annotation>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
- <xsl:template match="annotation" mode="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="force.documentation" select="'Generated by p5dkp.entities.submodel:specialize'"/>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xs:documentation><xsl:value-of select="$force.documentation"/></xs:documentation>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="documentation" mode="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:template name="p5dkp.entities.submodel:specialize.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="simpleType[@name=$p5dkp.entities.submodel:specialize.entity.name]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="p5dkp.entities.submodel:specialize.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise>
- <xs:simpleType name="{$p5dkp.entities.submodel:specialize.entity.name}">
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.name,'_',generate-id())"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:restriction base="{$p5dkp.entities.submodel:specialize.entity.simpleType}"/>
- </xs:simpleType>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5dkp.entities.submodel:clean_id" match="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities.submodel:clean_id" match="@id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
-
- <xsl:template mode="p5dkp.entities.submodel:specialize.simpleType" match="simpleType[@name=$p5dkp.entities.submodel:specialize.entity.name]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:attribute name="id" select="concat(@name,'_',generate-id())"/>
- <xsl:apply-templates select="@*" mode="p5dkp.entities.submodel:clean_id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:restriction base="{$p5dkp.entities.submodel:specialize.entity.simpleType}"/>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template name="p5dkp.entities.submodel:specialize.complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="complexType[@name=$p5dkp.entities.submodel:specialize.entity.name.complexType]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="p5dkp.entities.submodel:specialize.complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise>
- <xs:complexType name="{$p5dkp.entities.submodel:specialize.entity.name.complexType}">
- <xsl:call-template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:simpleContent>
- <xs:extension base="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name}"/>
- </xs:simpleContent>
- </xs:complexType>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities.submodel:specialize.complexType" match="complexType[@name=$p5dkp.entities.submodel:specialize.entity.name.complexType]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:attribute name="id" select="concat(@name,'_',generate-id())"/>
- <xsl:apply-templates select="@*" mode="p5dkp.entities.submodel:clean_id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:simpleContent>
- <xs:extension base="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name}"/>
- </xs:simpleContent>
- </xsl:copy>
- </xsl:template>
-
-
-
-
- <xsl:template name="p5dkp.entities.submodel:specialize.group.model" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="group[@name=$p5dkp.entities.submodel:specialize.entity.model]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="p5dkp.entities.submodel:specialize.group.model" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise>
- <xs:group name="{$p5dkp.entities.submodel:specialize.entity.name}">
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_',generate-id())"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:sequence>
- <xs:element minOccurs="0" name="{$p5dkp.entities.submodel:specialize.entity.name}" type="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name.complexType}">
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_a_',generate-id())"/>
- </xs:element>
- </xs:sequence>
- </xs:group>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities.submodel:specialize.group.model" match="group[@name=$p5dkp.entities.submodel:specialize.entity.model]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_',generate-id())"/>
- <xsl:apply-templates select="@*" mode="p5dkp.entities.submodel:clean_id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:complexContent>
- <xs:extension base="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name}"/>
- </xs:complexContent>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template name="p5dkp.entities.submodel:specialize.group.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="group[@name='entities']" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="p5dkp.entities.submodel:specialize.group.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise>
- <xs:group name="entities">
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_',generate-id())"/>
- <xsl:call-template name="p5dkp.entities.submodel:specialize.annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:sequence>
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_',generate-id())"/>
- <xs:complexContent>
- <xs:extension base="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name}"/>
- </xs:complexContent>
- </xs:sequence>
- </xs:group>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities.submodel:specialize.group.entities" match="group[@name='entities']" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:attribute name="id" select="concat($p5dkp.entities.submodel:specialize.entity.prefix,'_',generate-id())"/>
- <xsl:apply-templates select="@*" mode="p5dkp.entities.submodel:clean_id" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xs:sequence>
- <xs:group ref="{$p5dkp.entities.submodel:specialize.entity.prefix}:{$p5dkp.entities.submodel:specialize.entity.name}"/>
- </xs:sequence>
- </xsl:copy>
- </xsl:template>
-
-
- </xsl:stylesheet>
|