| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947 |
- <?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="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">
-
-
-
- <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-generated:basedir"/>
- <xsl:param name="p5dkp.entities-generated:debug"/>
- <xsl:param name="p5dkp:xsd" required="yes"/>
- <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-er:prefix.prefix" select="'p5dkp-er.'"/>
- <xsl:param name="p5dkp-er:file.prefix" select="'p5dkp-er.'"/>
- <xsl:param name="p5dkp-er:targetNamespace.fragment" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.'"/>
- <xsl:param name="p5dkp.entities-generated:entity.name.prefix" select="'entities__x3A__'"/>
- <xsl:param name="p5dkp.entities:prefix" select="'p5dkp.entities'"/> <!-- to replace to local -->
- <xsl:param name="p5dkp.generated.xsd" required="yes"/>
-
-
- <xsl:include href="p5dkp.entities-generated.functions.xsl"/>
- <xsl:include href="../flat_relation_cache/p5frc.build_complexType.xsl"/>
-
- <!-- template to generate from p5dkp.entities-relations.xsd
- p5dkp.entities-generated.xsd (like p5dkp:xsd )
- with flat_relation_cache and asserts calculations to then follow
- -->
-
-
- <xsl:template mode="p5dkp.entities-generated:p5frc.build_complexType.xml" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xs:schema>
- <xsl:copy-of select="@vc:minVersion"/>
- <xsl:copy-of select="@elementFormDefault"/>
- <xsl:copy-of select="namespace::*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd'"/>
-
- <xsl:comment>#62 testing spaces</xsl:comment>
- <!--<xsl:copy copy-namespaces="no">
-
- <xsl:copy-of select="@vc:minVersion"/>
- <xsl:copy-of select="@elementFormDefault"/>
- <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd'"/>-->
- <xsl:if test="number($p5dkp.entities-generated:debug) > 3"><xsl:message>#61 match p5dkp.entities-generated:p5frc.build_complexType.xml</xsl:message></xsl:if>
- <xsl:apply-templates mode="p5frc:build_complexType" select="*"/>
- <!--</xsl:copy>-->
- </xs:schema>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xs:schema>
- <xsl:copy-of select="namespace::*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:copy-of select="@vc:minVersion"/>
- <xsl:copy-of select="@elementFormDefault"/>
- <xsl:copy-of select="@targetNamespace"/>
- <!--<xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd'"/>-->
- <xsl:if test="number($p5dkp.entities-generated:debug) > 3"><xsl:message>#63 match mode="p5dkp.entities-generated:xsd" match="schema" </xsl:message></xsl:if>
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:comment>#85 todo attributes to some defaults</xsl:comment>
- <xs:attribute name="id" type="p5dkp.entities:id"/>
- <xs:attribute name="idref" type="xs:IDREF"/>
-
- <xs:simpleType name="dita.ID">
- <xs:annotation>
- <xs:documentation>Dziedziczone z typów DITA</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:ID"/>
- </xs:simpleType>
-
- </xs:schema>
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:p5xsda.sort" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
- <xsl:choose>
- <xsl:when test=".//p5xsda:sort">
- <xsl:apply-templates xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="#current">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
- </xsl:apply-templates>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:p5xsda.sort" match="p5xsda:sort" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates mode="#current" select="@*">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:p5xsda.sort" match="@p5xsda:sort.element">
- <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
- <xsl:attribute name="p5xsda:sort.element" select="p5dkp.entities-generated:fix.entity.name(.,$p5dkp.entities-generated:entity)"/>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:p5xsda.sort" match="@*">
- <xsl:copy-of select="."/>
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexType[ not( ancestor::complexType)]">
- <xsl:comment>#126 ROOOTROOOTROOOTROOT NA REFS NOW run mode="p5dkp.entities-generated:generated.xsd.elements" </xsl:comment>
- <!--<DEBUYG_ANCESTORS>
- <xsl:attribute name="test1" select="complexType[ not( ancestor::complexType)]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="test2" select="ancestor::complexType/@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <dig>
- <xsl:copy-of select="ancestor::complexType"></xsl:copy-of>
- </dig>
- </DEBUYG_ANCESTORS>-->
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.elements" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:comment>#126 EOF ROOT EOF ROOT _ TERAZ COMPLEXTYPES BEZ REFS run mode="p5dkp.entities-generated:generated.xsd.elements" </xsl:comment>
- <xsl:copy copy-namespaces="yes">
- <xsl:copy-of select="@*"/>
- <xsl:message>#129 mode="p5dkp.entities-generated:generated.xsd"</xsl:message>
- <!-- <xs:complexContent>
- <xs:extension base="{$p5dkp-er:prefix.prefix}{@name}:{@name}">
- <xs:sequence>
- -->
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <!--
- <xs:element maxOccurs="unbounded" ref="p5dkp:{@name}" minOccurs="0">
- <xs:annotation>
- <xs:appinfo>
- <xsl:comment>#116 try p5dkp.entities-generated:p5xsda.sort</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:p5xsda.sort">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="@name"/>
- </xsl:apply-templates>
- <!-\-<p5xsda:sort p5xsda:sort.element="etap_prio" p5xsda:sort="ascending"/>-\->
- <system_cache__appinfo:flat_relation_cache>
- <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="role_no" system_cache__appinfo:xpath="p5dkp:wymagania/role_no"/>
- </system_cache__appinfo:flat_relation_cache>
- </xs:appinfo>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" ref="p5dkp:zadanie">
- <xs:annotation>
- <xs:appinfo>
- <xsl:comment>#116 try p5dkp.entities-generated:p5xsda.sort</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:p5xsda.sort">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="@name"/>
- </xsl:apply-templates>
- <!-\-<p5xsda:sort p5xsda:sort.element="etap_prio" p5xsda:sort="ascending"/>-\->
- <system_cache__appinfo:flat_relation_cache>
- <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="role_no" system_cache__appinfo:xpath="p5dkp:zadanie/role_no"/>
- </system_cache__appinfo:flat_relation_cache>
- </xs:appinfo>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="0" ref="p5dkp:worker" maxOccurs="unbounded">
- <xs:annotation>
- <xs:appinfo>
- <!-\-<p5xsda:sort p5xsda:sort.element="etap_prio" p5xsda:sort="ascending"/>-\->
- <xsl:comment>#145 try p5dkp.entities-generated:p5xsda.sort</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:p5xsda.sort">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="@name"/>
- </xsl:apply-templates>
- <system_cache__appinfo:flat_relation_cache>
- <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="role_no" system_cache__appinfo:xpath="p5dkp:worker/role_no"/>
- </system_cache__appinfo:flat_relation_cache>
- </xs:appinfo>
- </xs:annotation>
- </xs:element>
- -->
- <!--</xs:sequence>
- </xs:extension>
- </xs:complexContent>-->
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:assert" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="*">
- <xsl:comment>#186 TODO mode="p5dkp.entities-generated:assert" </xsl:comment>
- <!--<xs:assert test="wymagania_role_time_sum = sum(p5dkp:role/number(role_time))">
- <xs:annotation>
- <xs:appinfo>
- <p5xsda:after>wymagania_no</p5xsda:after>
- </xs:appinfo>
- <xs:documentation>after wymagania_prio</xs:documentation>
- </xs:annotation>
- </xs:assert>-->
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexType[ parent::schema ]">
- <xsl:comment>#201 match="complexType[ parent::schema ]" </xsl:comment>
- <xs:element name="{@name}">
- <xsl:if test="string-length(@id) > 0 "><xsl:copy-of select="@id"/></xsl:if>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="p5dkp:{@name}">
- <xs:sequence>
- <xsl:variable name="er.entity.no.local" select="@name"/>
- <xsl:variable name="er.entity.local" select="concat($p5dkp-er:prefix.prefix,@name)"/>
- <xsl:comment>#216 to tutaj - dajemy apply p5dkp.entities-generated:generated.xsd.elements.refs </xsl:comment>
- <!--<xsl:apply-templates mode="p5dkp.entities-generated:assert">
- <xsl:with-param name="p5dkp.entities-generated:entity" select="@name"/>
- </xsl:apply-templates>-->
- <xsl:variable name="p5frc:entity.relation.source">
- <xsl:apply-templates mode="p5frc:entity.relation.source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:variable>
-
- <xsl:variable name="p5dkp.entities-generated:generated.xsd.elements.refs">
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.elements.refs" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:with-param name="p5frc:entity.relation.source" select="$p5frc:entity.relation.source"/>
- </xsl:apply-templates>
- </xsl:variable>
-
- <!--<xsl:comment>#231 generujemy relacje do obiektow obcych sequence/element
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
-
- </xsl:comment>-->
-
- <!--<xsl:copy-of select="$p5dkp.entities-generated:generated.xsd.elements.refs"/>-->
-
- <!-- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### -->
-
- <xsl:variable name="p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique">
- <p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique>
- <xsl:for-each-group select="$p5dkp.entities-generated:generated.xsd.elements.refs/sequence/group" group-by="@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:variable name="emtities.group" select="@name"/>
- <xsl:copy-of select="@*"/>
- <er.entity_to_entities.type.list>
- <xsl:for-each-group select="current-group()/sequence/element" group-by="substring-before(@type,':')">
- <er.entity_to_entities.type>
- <xsl:variable name="er.entity" select="substring-before(@type,':')"/>
- <xsl:variable name="er.entity.no" select="substring-after(substring-before(@type,':'),$p5dkp-er:prefix.prefix)"/>
- <xsl:attribute name="er.entity" select="$er.entity"/>
- <xsl:attribute name="er.entity.no" select="$er.entity.no"/>
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="element" select="local-name()"/>
- <xsl:attribute name="uses.emtities.group" select="$emtities.group"/>
- <wykrywamy_klucze>
- <xsl:attribute name="er.entity.no.local" select="$er.entity.no.local"/>
- <xsl:attribute name="er.entity.local" select="$er.entity.local"/>
- <xsl:attribute name="system_cache__appinfo:ref_engine" select="'view'"/>
- <xsl:choose>
-
- <xsl:when test="string-length($er.entity) < 1 or string-length($er.entity) < 1">
- <xsl:message terminate="yes">#269 UNCORRECT string-length($er.entity) < 1 or string-length($er.entity) < 1</xsl:message>
- </xsl:when>
- <xsl:when test="$er.entity = $er.entity.local">
- <xsl:attribute name="czy_jest_lokalny_entities" select="'tak - $er.entity = $er.entity.local'"/>
-
- <xsl:choose>
- <xsl:when test="$emtities.group = 'entities.basic'">
- <xsl:attribute name="entities.basic.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.assert'">
- <xsl:attribute name="entities.assert.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_assert.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate'">
- <xsl:attribute name="entities.allocate.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no_allocate.map')"/>
- </xsl:when>
-
- <xsl:when test="$emtities.group = 'entities.required_finished'">
- <xsl:attribute name="entities.required_finished.providing"/>
- <!--<xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_features')"/>-->
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.local,'_features')"/>
- <xsl:attribute name="system_cache__appinfo:name.1" select="concat($er.entity.local,'_prio')"/>
- <xsl:attribute name="system_cache__appinfo:name.extra"><xsl:value-of select="$er.entity.no"/>_prio</xsl:attribute>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate.map'">
- <xsl:attribute name="entities.allocate.map.providing"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.required_finished.map'">
- <xsl:attribute name="entities.required_finished.map.providing"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.stricte.map'">
- <xsl:attribute name="entities.stricte.map.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_stricte.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate.map'">
- <xsl:attribute name="entities.stricte.map.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_allocate.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath1" select="concat($er.entity.no,'_allocate_price.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath2" select="concat($er.entity.no,'_allocate_price_recur.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath3" select="concat($er.entity.no,'_allocate_price_recur_cond.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath4" select="concat($er.entity.no,'_allocate_time.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
-
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.group.map'">
- <xsl:attribute name="entities.group.map.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_contained.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:xpath.1" select="concat($er.entity.no,'_no_include.map')"/>
- <xsl:attribute name="system_cache__appinfo:name.1" select="concat($er.entity.no.local,'_no')"/>
-
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="providing_TODO" select="'othrerwise'" xpath-default-namespace=""/>
- </xsl:otherwise>
-
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="czy_jest_lokalny_entities" select="'nie'"/>
- <xsl:attribute name="DEBUG_TODO" select="'wychodzi ze trzeba dorobic kolejny model do kontekstow uzycia co sie jak laczy, analogicznie do tego manuala/aby to zasilalo ten komponent'"/>
- <xsl:choose>
- <xsl:when test="$emtities.group = 'entities.basic'">
- <xsl:attribute name="entities.basic.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no_allocate.map')"/>
-
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.assert'">
- <xsl:attribute name="entities.assert.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_assert.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate'">
- <xsl:attribute name="entities.allocate.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no_allocate.map')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.assert'">
- <xsl:attribute name="entities.assert.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no_assert')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.required_finished'">
- <xsl:attribute name="entities.required_finished.providing"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate.map'">
- <xsl:attribute name="entities.allocate.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no_allocate.map')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.required_finished.map'">
- <xsl:attribute name="entities.required_finished.map.providing"/>
-
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity,'_no_required_finished.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.stricte.map'">
- <xsl:attribute name="entities.stricte.map.providing"/>
-
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_stricte.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.group.map'">
- <xsl:attribute name="entities.group.map.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_contained.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- <xsl:attribute name="system_cache__appinfo:xpath.1" select="concat($er.entity.no,'_no_include.map')"/>
- <xsl:attribute name="system_cache__appinfo:name.1" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:when test="$emtities.group = 'entities.allocate.map'">
- <xsl:attribute name="entities.stricte.map.providing"/>
- <xsl:attribute name="system_cache__appinfo:xpath" select="concat($er.entity.no,'_no_allocate.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath1" select="concat($er.entity.no,'_allocate_price.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath2" select="concat($er.entity.no,'_allocate_price_recur.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath3" select="concat($er.entity.no,'_allocate_price_recur_cond.map')"/>
- <xsl:attribute name="system_cache__appinfo:xpath4" select="concat($er.entity.no,'_allocate_time.map')"/>
- <xsl:attribute name="system_cache__appinfo:name" select="concat($er.entity.no.local,'_no')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="providing_TODO" select="'othrerwise'" xpath-default-namespace=""/>
- </xsl:otherwise>
-
- </xsl:choose>
-
- </xsl:otherwise>
- </xsl:choose>
-
- </wykrywamy_klucze>
- </er.entity_to_entities.type>
- </xsl:for-each-group>
- </er.entity_to_entities.type.list>
-
- </xsl:copy>
- </xsl:for-each-group>
- </p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique>
- </xsl:variable>
-
- <xsl:comment>#401 ##### #######################################################</xsl:comment>
-
-
- <xsl:for-each select="$p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique/p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique/*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <!-- <xs:element id="{@id}">
- <xsl:attribute name="ref" select="concat('p5dkp.entities:',@name)"/>
- </xs:element>-->
- <xsl:for-each select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:for-each select="er.entity_to_entities.type" xpath-default-namespace="">
- <xsl:comment>#411 <xsl:value-of select="name()"/> <xsl:copy-of select="@*"/></xsl:comment>
- <xsl:choose>
- <xsl:when test="@er.entity.no and wykrywamy_klucze/@system_cache__appinfo:name and wykrywamy_klucze/@system_cache__appinfo:xpath">
- <xs:element ref="p5dkp:{@er.entity.no}">
- <xsl:if test="string-length(@id) > 0 "><xsl:copy-of select="@id"/></xsl:if>
- <xs:annotation>
- <xs:appinfo>
- <system_cache__appinfo:flat_relation_cache>
- <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="{wykrywamy_klucze/@system_cache__appinfo:name}" system_cache__appinfo:xpath="p5dkp:{@er.entity.no}/{wykrywamy_klucze/@system_cache__appinfo:xpath}"/>
- </system_cache__appinfo:flat_relation_cache>
- </xs:appinfo>
- </xs:annotation>
- </xs:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>
- #429 somethinbg missing for <xsl:value-of select="@er.entity.no"/>
- </xsl:comment>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
-
- <!--<xsl:copy-of select="$p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique"/>-->
-
-
- <xsl:comment>#250 dla kazdej z grupy probuje zobaczyc z czym sie laczy i zrobic zaleznosc</xsl:comment>
- <xsl:variable name="er.entity.amalysis">
- <er.entity.amalysis>
- <xsl:for-each select="$p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique/p5dkp.entities-generated:generated.xsd.elements.refs.entity.groups.unique/*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <dla_kazdego_szukam_powiazan>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:copy-of select="@*"/>
- <xsl:variable name="entities.group" select="@name"/>
- <xsl:attribute name="entities.group" select="$entities.group"/>
- <xsl:for-each-group select="$p5dkp.entities-generated:generated.xsd.elements.refs/sequence/group[@name = $entities.group ]/sequence/element" group-by="substring-before(@type,':')" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <element.no.to.entities.group.used>
- <xsl:variable name="er.entity" select="substring-before(@type,':')"/>
- <xsl:attribute name="er.entity" select="$er.entity"/>
- <xsl:attribute name="entities.group.local" select="../../@name"/>
- <xsl:attribute name="er.entity.no" select="substring-after(substring-before(@type,':'),$p5dkp-er:prefix.prefix)"/>
- <xsl:copy-of select="@*"/>
- <xsl:comment>#256 jedizemy dla kazdego typu allokacji zaleznosci - sprawdzmy dokad ma to er.entity powiazania - to jakich zaleznosci </xsl:comment>
- <!--<xsl:for-each-group select="$p5dkp.entities-generated:generated.xsd.elements.refs/sequence/group/sequence/element[@type=]"></xsl:for-each-group>-->
- </element.no.to.entities.group.used>
- </xsl:for-each-group>
- </dla_kazdego_szukam_powiazan>
- </xsl:for-each>
- </er.entity.amalysis>
- </xsl:variable>
- <!--<xsl:copy-of select="$er.entity.amalysis"/>-->
- <!-- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### -->
- <xsl:comment>#288 generujemy relacje do obiektow obcych sequence/element
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
- ######## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### #######
-
- </xsl:comment>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- </xsl:template>
-
-
- <xsl:template mode="p5frc:entity.relation.source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexContent[extension[substring-after(@base,':')='entities'] ]"> <!-- [ substring-after(@base,':')='entities' and substring-before(@base,':')=$p5dkp.entities:prefix ]] -->
- <p5frc:entity.relation.source>
- <xsl:variable name="base.child.prefix" select=" substring-before(extension/@base,':')"/>
- <xsl:attribute name="p5frc:entity.relation.source.namespace" select="root()/schema/namespace::*[ name() = $base.child.prefix]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:prefix" select="$p5dkp.entities:prefix"/>
- <xsl:attribute name="p5dkp.entities:entity.prefix" select="$base.child.prefix"/>
- <xsl:attribute name="element" select="name()"/>
- <xsl:attribute name="base.child" select="extension/@base" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:entity.childs.count" select="count(.//*)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <attributes><xsl:copy-of select="@*"/></attributes>
- <xsl:comment>#250 note sprawdzamy zaleznosci pomiedzy lokalnym source
- czyli jak jhestesmy typ WYMAGANIA to mamy komus zrobione przez :
- group : p5dkp-er.role:entities.allocate.map -> role_no_allocate.map -> enitites_x3a__no , no.allocate , no.map, attriubutes itp
-
- lub p5dkp-er.etap:entities.group.map -> etap_no_contained.map -> etap_no_contained.map -> entities__x3A___no_contained.map _> no.contained -> no.map -> map @keyref , @p5dkp:idref
-
- - czyli trzeba odgadnac jak sie odpywac po ze moje lokalne etap_no_contained.map = w etapach etap_np
-
-
- </xsl:comment>
- </p5frc:entity.relation.source>
- </xsl:template>
-
- <xsl:template mode="p5frc:entity.relation.source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="*">
- <xsl:message terminate="yes">#237 unatendet didnt found extension[ substring-after(@base,':')='entities'] = <xsl:value-of select="name()"/> ; <xsl:copy-of select="@*" copy-namespaces="no"/> </xsl:message>
- <p5frc:entity.relation.source.namespace_ERROR>
- <xsl:attribute name="p5frc:entity.relation.source.namespace" select="root()/schema/namespace::*[ . = current()/substring-before(@base,':')]/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:prefix" select="$p5dkp.entities:prefix"/>
- <xsl:attribute name="element" select="name()"/>
- <attributes><xsl:copy-of select="@*"/></attributes>
- <sample><xsl:copy-of select=".//*[ position() < 10]"/></sample>
- <xsl:message terminate="no">#237 unatendet didnt found extension[ substring-after(@base,':')='entities'] = <xsl:value-of select="name()"/> ; <xsl:copy-of select="@*" copy-namespaces="no"/> </xsl:message>
- <xsl:comment >#237 unatendet didnt found extension[ substring-after(@base,':')='entities'] = <xsl:value-of select="name()"/> ; <xsl:copy-of select="@*" copy-namespaces="no"/> </xsl:comment>
- </p5frc:entity.relation.source.namespace_ERROR>
- </xsl:template>
-
-
- <xsl:template name="p5frc:entity.relation.source.analys"><!-- TO ANALYZE NODES IF ARE REALTED DO DEST -->
- <xsl:param name="p5frc:entity.relation.source" required="yes"/>
- <xsl:param name="p5frc:entity.relation.dest" required="yes"/>
-
- <p5frc:entity.relation.source.analys>
- <!--<xsl:choose>
- <xsl:when test=""></xsl:when>
- </xsl:choose>-->
-
-
- </p5frc:entity.relation.source.analys>
-
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.group" match="xs:sequence">
- <xsl:comment>#234 mode="p5dkp.entities-generated:generated.xsd.elements.refs.group" </xsl:comment>
- <xsl:for-each-group select="*" group-by="@ref">
- <xsl:copy-of select="."/>
- </xsl:for-each-group>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="complexContent|extension" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="p5frc:entity.relation.source" required="yes"/>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:with-param name="p5frc:entity.relation.source" select="$p5frc:entity.relation.source"/>
- </xsl:apply-templates>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy-of select="."/>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="complexType[not( ancestor::complexType)]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="p5frc:entity.relation.source" required="yes"/>
- <xsl:comment>#228-C @id= <xsl:copy-of select="@*" copy-namespaces="no"/> disabled mode p5dkp.entities-generated:generated.xsd.elements.refs=<xsl:value-of select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ; </xsl:comment>
- <xsl:copy-of select="$p5frc:entity.relation.source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:apply-templates mode="p5frc:entity.relation.dest" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:template>
-
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="group" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:template>-->
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="text()|comment()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#228-A disabled mode p5dkp.entities-generated:generated.xsd.elements.refs=<xsl:value-of select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ; <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:comment>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#228-B disabled mode p5dkp.entities-generated:generated.xsd.elements.refs=<xsl:value-of select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ; <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:comment>
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexType[ not(parent::schema) ]">
- <xsl:comment>#218 not complexType[ not(parent::schema) ] </xsl:comment>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexType[ ancestor::complexType]" priority="9">
- <xsl:comment>#286 match="complexType[ ancestor::complexType]" disabled loop </xsl:comment>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="*">
- <xsl:comment>#219 disabled <xsl:value-of select="name()"/>; <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:comment>
- <!--<xsl:apply-templates mode="#current"/>-->
- </xsl:template>
-
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="sequence">
- <xsl:comment>#223 match="sequence" </xsl:comment>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:for-each-group select="group" group-by="substring-before(@ref,':')" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#291 matched</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.refs" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:for-each-group>
- </xsl:template>-->
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="text()|comment()"/>
-
-
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="complexContent" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:comment>#337 match="complexContent"</xsl:comment>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements" match="extension" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xs:extension base="{$p5dkp-er:prefix.prefix}{../../@name}:{../../@name}">
- <xsl:comment>#245-A mode="p5dkp.entities-generated:generated.xsd"</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.elements" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xs:extension>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="extension" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xs:extension base="{$p5dkp-er:prefix.prefix}{../../@name}:{../../@name}">
- <xsl:comment>#304 mode="p5dkp.entities-generated:generated.xsd"</xsl:comment>
- <xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xs:extension>
- </xsl:template>
-
-
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="text()|comment()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#263 ignored for <xsl:value-of select="name()"/> <xsl:copy-of select="@*" copy-namespaces="no"/> <xsl:copy-of select="text()"/><xsl:copy></xsl:copy></xsl:comment>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#263-B ignored for <xsl:value-of select="name()"/> <xsl:copy-of select="@*" copy-namespaces="no"/> <xsl:copy-of select="text()"/><xsl:copy></xsl:copy></xsl:comment>
- </xsl:template>
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd" match="text()" xpath-default-namespace="">
- <xsl:comment>#263-B ignored for <xsl:value-of select="name()"/> <xsl:copy-of select="@*" copy-namespaces="no"/> <xsl:copy-of select="text()"/><xsl:copy></xsl:copy></xsl:comment>
- </xsl:template>-->
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd" match="group[@ref]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:template>-->
-
- <!--<xsl:template xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="group" mode="p5dkp.entities-generated:generated.xsd.local">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:template>-->
-
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#199 ignored mode="p5dkp.entities-generated:generated.xsd" match="*" name=<xsl:value-of select="name()"/> <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:comment>
- </xsl:template>-->
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd" match="import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <!--<xsl:copy-of select="." copy-namespaces="no"/>-->
- <xs:import namespace="{@namespace}">
- <xsl:attribute name="schemaLocation" select="p5frc:try.import.fix.schemaLocation.path(@schemaLocation)"/>
- </xs:import>
- </xsl:template>
-
-
-
-
-
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="sequence" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates xpath-default-namespace="http://www.w3.org/2001/XMLSchema" mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq"/>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq" match="group[@ref]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <!-- <xsl:copy>
- <xsl:copy-of select="@*"/>-->
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <!--</xsl:copy>-->
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq" match="group" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <p5dkp.entities-generated:generated.xsd.elements.refs.seq.extra>
- <xsl:apply-templates select=".//*" mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq.extra" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </p5dkp.entities-generated:generated.xsd.elements.refs.seq.extra>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq" match="sequence" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq.extra" match="complexContent|complexContent|extension|simpleContent|simpleType|restriction|system_cache__appinfo:primaryKey|appinfo|annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs.seq p5dkp.entities-generated:generated.xsd.elements.refs.seq.extra" match="text()|comment()|*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
-
- <!--<xsl:template mode="p5dkp.entities-generated:generated.xsd.elements.refs" match="sequence" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="p5frc:entity.relation.source" required="yes"/>
- <xsl:comment>#220 mode="p5dkp.entities-generated:generated.xsd.elements.refs" @id=<xsl:value-of select="@id"/></xsl:comment>
- <!-\-<xsl:variable name="group">-\->
- <xs:sequence>
- <!-\-<xsl:for-each-group select="group" group-by="substring-before(@ref,':')" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">-\->
- <!-\-<xsl:comment>#222 matched </xsl:comment>-\->
- <!-\-<xsl:variable name="p5frc:target_object" select="@ref"/>-\->
-
- <xsl:choose>
- <xsl:when test=".//extension[@base='p5dkp.entities:entities']/complexType/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#442 niepotrzebne przetworzenie jest abtract</xsl:comment>
- </xsl:when>
- <xsl:otherwise>
- <p5frc:entity.relation.source>
- <xsl:copy-of select="$p5frc:entity.relation.source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </p5frc:entity.relation.source>
- <xsl:for-each select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:variable name="p5frc:entity.relation.dest">
- <xsl:apply-templates mode="p5frc:entity.relation.dest" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:variable>
- <xsl:copy-of select="$p5frc:entity.relation.dest"/>
- <xsl:call-template name="p5frc:entity.relation.source.analys">
- <xsl:with-param name="p5frc:entity.relation.dest" select="$p5frc:entity.relation.dest"/>
- <xsl:with-param name="p5frc:entity.relation.source" select="$p5frc:entity.relation.source"/>
- </xsl:call-template>
- <!-\-<EACH_TEST>
- <xsl:attribute name="pos.child" select="position()"/>
- <xsl:attribute name="element" select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="name" select="concat(@ref,@name)"/>
- <xsl:attribute name="depth" select="count(descendant::*)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </EACH_TEST>-\->
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
-
-
-
-
- <!-\-<DEBUG_FIRST_RELS_group>
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="element" select="name()"/>
- <xsl:attribute name="pos_group" select="position()"/>-\->
-
-
- <!-\-<FOREACH_TEST_must_use_full_group_data>-\->
-
- <!-\-</FOREACH_TEST_must_use_full_group_data>-\->
- <!-\-<xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.refs" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-\->
- <!-\-</DEBUG_FIRST_RELS_group>-\->
-
-
- <!-\-</xsl:for-each-group>-\->
- </xs:sequence>
- <!-\-</xsl:variable>-\->
- <!-\-<xsl:apply-templates mode="p5dkp.entities-generated:generated.xsd.elements.refs.group" select="$group"/>-\->
-
- </xsl:template>-->
-
-
- <xsl:template mode="p5frc:entity.relation.dest" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="group|complexContent"> <!-- [ substring-after(@base,':')='entities' and substring-before(@base,':')=$p5dkp.entities:prefix ]] -->
- <p5frc:entity.relation.dest>
- <xsl:variable name="p5dkp.entities:dest.prefix" select=" substring-before(@ref,':')"/>
- <xsl:attribute name="p5frc:entity.relation.dest.namespace" select="root()/schema/namespace::*[ name() = $p5dkp.entities:dest.prefix]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:prefix" select="$p5dkp.entities:prefix"/>
- <xsl:attribute name="p5dkp.entities:entity.prefix" select="$p5dkp.entities:dest.prefix"/>
- <xsl:attribute name="element" select="name()"/>
- <xsl:attribute name="elements.child" select="*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5frc:entity.relation.dest.group.chilst" select="group/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:entity.childs.count" select="count(.//*)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="p5dkp.entities:entities.child.abstract" select=".//extension[@base='p5dkp.entities:entities']/complexType/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> <!-- and complexType[ @abstract='true' ] -->
- <attributes><xsl:copy-of select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></attributes>
- <p5frc:entity.relation.anal.child>
- <!--<xsl:for-each select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <pos>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="count" select="count(.//.)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </pos>
- </xsl:for-each>-->
- <childs>
- <xsl:apply-templates mode="p5frc:entity.relation.go_bottom" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </childs>
- </p5frc:entity.relation.anal.child>
- </p5frc:entity.relation.dest>
- </xsl:template>
-
- <xsl:template mode="p5frc:entity.relation.go_bottom" match="text()|comment()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
-
- <xsl:template mode="p5frc:entity.relation.go_bottom" match="documentation|annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:template mode="p5frc:entity.relation.go_bottom" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <!--<p5frc:entity.relation.go_bottom>
- <xsl:copy-of select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:attribute name="element" select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-->
- <xsl:variable name="p5frc:entity.relation.try">
- <p5frc:entity.relation.try>
- <xsl:for-each select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <pos>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="count" select="count(.//.)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </pos>
- </xsl:for-each>
- </p5frc:entity.relation.try>
- </xsl:variable>
- <xsl:variable name="max.count" select="max($p5frc:entity.relation.try//pos[ not(local-name()='documentation') and not(local-name()='annotation') ]/number(@count))" xpath-default-namespace="" />
- <xsl:variable name="max.count.pos" select="$p5frc:entity.relation.try//pos[@count = $max.count]/@pos" xpath-default-namespace=""/>
- <xsl:variable name="max.count.pos.count" select="count($p5frc:entity.relation.try//pos[@count = $max.count]/@pos)" xpath-default-namespace=""/>
- <!-- <xsl:attribute name="max.count" select="$max.count"/>
- <xsl:attribute name="max.count.pos" select="$max.count.pos"/>
- <xsl:attribute name="max.count.pos.count" select="$max.count.pos.count"/>
- <xsl:copy-of select="$p5frc:entity.relation.try" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-->
- <xsl:choose>
- <xsl:when test="$max.count.pos.count = 1 and $max.count > 3">
- <xsl:comment>#518-A going to [<xsl:value-of select="$max.count.pos"/>] @id=<xsl:value-of select="@id"/></xsl:comment>
- <xsl:apply-templates mode="#current" select="*[$max.count.pos]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:when test="$max.count < 3">
- <p5frc:entity.relation.go_bottom>
- <xsl:copy-of select="*" copy-namespaces="no" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </p5frc:entity.relation.go_bottom>
- </xsl:when>
- <xsl:when test="$max.count.pos.count > 1">
- <!--<xsl:message terminate="yes">#523 more pos <xsl:copy-of select="$p5frc:entity.relation.try//@*" copy-namespaces="no"/></xsl:message>-->
- <xsl:comment>#527-B going to max B @id=<xsl:value-of select="@id"/></xsl:comment>
- <xsl:variable name="context" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:for-each select="$p5frc:entity.relation.try//pos[@count = $max.count]" xpath-default-namespace="">
- <xsl:comment>#527-C going all to max C - <xsl:value-of select="@pos"/>; @id=<xsl:value-of select="@id"/></xsl:comment>
- <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" select="$context/*[ current()/@pos ]"/>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <p5frc:entity.relation.go_bottom>
- <xsl:attribute name="D"/>
- <xsl:copy-of select="*" copy-namespaces="no" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </p5frc:entity.relation.go_bottom>
- </xsl:otherwise>
- </xsl:choose>
- <!--</p5frc:entity.relation.go_bottom>-->
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5frc:entity.relation.dest" match="annotation" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
-
- <xsl:template mode="p5frc:entity.relation.dest" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:message terminate="no">#439 unatended not match match="group[group]]" <xsl:value-of select="name()"/>; <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:message>
- <p5frc:entity.relation.dest_ERROR>
- <xsl:attribute name="element" select="name()"/>
- <xsl:attribute name="elements.child" select="*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <attributes><xsl:copy-of select="@*"/></attributes>
- <xsl:comment >#439 unatended not match match="group[group]]" <xsl:value-of select="name()"/>; <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:comment>
- <childs>
- <xsl:apply-templates mode="p5frc:entity.relation.go_bottom" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <!--<xsl:for-each select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <pos>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="count" select="count(.//.)"/>
- <xsl:copy-of select="@*"/>
-
- <xsl:copy-of select="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </pos>
- </xsl:for-each>-->
- </childs>
- </p5frc:entity.relation.dest_ERROR>
- </xsl:template>
-
- <xsl:template mode="p5dkp.entities-generated:generated.xsd.refs" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="*">
- <xs:element ref="{concat('p5dkp:',p5dkp.entities-generated:entity(@ref))}">
- <xsl:apply-templates mode="system_cache__appinfo:flat_relation_cache" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xs:element>
- <xsl:comment>#279 backreffs there</xsl:comment>
- <xsl:for-each-group select="root()/schema/complexType/complexContent/extension/sequence/group[substring-before(@ref,':') = current()/substring-before(@ref,':')]" group-by="ancestor::complexType[1]/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:message>#281 backref found = <xsl:value-of select="ancestor::complexType[1]/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:message>
- <xsl:comment>#281 backref found = <xsl:value-of select="ancestor::complexType[1]/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:comment>
- <!--<DEBUG>
- <xsl:attribute name="looking" select="ancestor::complexType[1]/@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-->
- <xs:element>
- <xsl:attribute name="ref" select="concat('p5dkp:',ancestor::complexType[1]/@name)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:apply-templates mode="system_cache__appinfo:flat_relation_cache" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xs:element>
- <!--</DEBUG>-->
- </xsl:for-each-group>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:flat_relation_cache" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <!--<xsl:comment> #294 todo mode="system_cache__appinfo:flat_relation_cache" szukamy</xsl:comment>-->
- <system_cache__appinfo:flat_relation_cache>
- <xsl:for-each select="*">
- <TEST pos="{position()}">
- <xsl:for-each select=".//*">
- <xsl:if test="position() = last()">
- <xsl:copy-of select="."/>
- </xsl:if>
- </xsl:for-each>
- </TEST>
- </xsl:for-each>
- <!--<xsl:apply-templates mode="#current"/>-->
- </system_cache__appinfo:flat_relation_cache>
- </xsl:template>
-
-
-
-
- </xsl:stylesheet>
|