| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436 |
- <?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:p5frc="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/flat_relation_cache/p5frc.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
- <xsl:param name="p5frc:basedir"/>
- <xsl:param name="p5dkp.local.idref.xsl" required="yes"/>
- <xsl:param name="p5dkp.map.keys.xml" required="yes"/>
- <xsl:param name="p5dkp:xsd" required="yes"/>
- <xsl:param name="p5dkp.nodes.path.add.xsl" required="yes"/>
- <xsl:param name="p5frc:debug" select="10"/>
-
- <xsl:param name="p5frc:targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd'"/> <!-- http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd -->
- <xsl:param name="p5frc:targetNamespace.name" select="'p5dkp'"/> <!-- p5dkp -->
-
- <xsl:param name="p5dkp.repository"/>
- <xsl:include href="p5frc.build_complexType.xsl"/>
-
-
- <!-- generate style like p5dkp:map.budzet_rola.xml xsl constructor -->
- <xsl:template xpath-default-namespace="http://www.w3.org/2001/XMLSchema"
- match="schema" mode="p5frc:map.budzet_rola.xsl">
-
- <xsl:variable name="schema">
- <xsl:apply-templates mode="p5frc:build_complexType" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:variable>
-
-
- <xsl:result-document href="/Users/a.binder/Downloads/schema.xml">
- <xsl:copy-of select="$schema"/>
- </xsl:result-document>
-
-
-
- <xsl:element name="xsl:stylesheet">
- <xsl:copy-of select="namespace::node()"/>
- <xsl:namespace name="p5xsda" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd'"/>
- <xsl:namespace name="p5frc" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/flat_relation_cache/p5frc.xsd'"/>
- <xsl:attribute name="exclude-result-prefixes" select="'xs'"/>
- <xsl:attribute name="version" select="'2.0'"/>
- <xsl:element name="xsl:output">
- <xsl:attribute name="indent" select="'yes'"/>
- </xsl:element>
- <xsl:element name="xsl:strip-space">
- <xsl:attribute name="elements" select="'*'"/>
- </xsl:element>
- <xsl:element name="xsl:include">
- <xsl:attribute name="href" select="$p5dkp.local.idref.xsl"/>
- </xsl:element>
- <xsl:element name="xsl:include">
- <xsl:attribute name="href" select="$p5dkp.nodes.path.add.xsl"/>
- </xsl:element>
-
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'p5dkp.map.keys'"/>
- <xsl:attribute name="select">doc('<xsl:value-of select="$p5dkp.map.keys.xml"/>')</xsl:attribute>
- </xsl:element>
- <xsl:comment>#63</xsl:comment>
- <xsl:element name="xsl:template">
- <xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply.root'"/>
- <xsl:attribute name="match" select="'p5dkp:merged.xml'"/>
- <xsl:element name="p5dkp:p5dkp.map.budzet_rola.xsl.flat_relations.xml">
- <xsl:attribute name="xsi:schemaLocation">http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd <xsl:value-of select="$p5dkp:xsd"/></xsl:attribute>
- <xsl:element name="xsl:apply-templates">
- <xsl:attribute name="mode" select="'#current'"/>
- </xsl:element>
- </xsl:element>
- </xsl:element>
-
- <xsl:apply-templates mode="p5frc:map.budzet_rola.xsl.child" select="$schema"/>
- <xsl:comment>#76</xsl:comment>
- <xsl:element name="xsl:template">
- <xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply.root p5frc:map.budzet_rola.xsl.apply'"/>
- <xsl:attribute name="match" select="'text()|comment()'"/>
- </xsl:element>
-
-
- </xsl:element>
-
- </xsl:template>
-
-
- <xsl:template mode="p5frc:derived p5frc:derived.match p5frc:derived.mode p5frc:derived.name" match="*|text()|comment()"/>
-
- <xsl:template mode="p5frc:derived" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:variable name="targetNamespace.detect" select="root()/schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:choose>
- <xsl:when test=".//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:value-of select=".//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="concat(p5frc:targetNamespace.name(root()),':',@name)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="p5frc:derived.match" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:attribute name="match"><xsl:apply-templates mode="p5frc:derived" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:attribute>
- </xsl:template>
-
-
- <xsl:template mode="p5frc:derived.mode" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="mode.default" required="yes"/>
- <xsl:choose>
- <xsl:when test=".//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:attribute name="mode" select=".//p5frc:derived"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="mode" select="$mode.default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="p5frc:derived.name" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:variable name="targetnamespace" select="p5frc:targetNamespace.name(root())" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:message>#117 $targetnamespace = <xsl:value-of select="$targetnamespace"/></xsl:message>
- <xsl:choose>
- <xsl:when test=".//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:value-of select=".//p5frc:derived/text()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#122 not <xsl:value-of select=".//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> for <xsl:value-of select="@name"/></xsl:message>
- <xsl:value-of select="concat($targetnamespace,':',@name)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:function name="p5frc:targetNamespace">
- <xsl:param name="p5dkp:xsd.root.node"/>
- <xsl:choose>
- <xsl:when test="not($p5frc:targetNamespace='')">
- <xsl:value-of select="$p5frc:targetNamespace"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="string-length($p5dkp:xsd.root.node/schema/@targetNamespace) = 0">
- <xsl:message terminate="yes">#143 cannot detect p5frc:targetNamespace.name - for better safety type $p5frc:targetNamespace parameter as default</xsl:message>
- </xsl:if>
- <xsl:value-of select="$p5dkp:xsd.root.node/schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:otherwise>
- </xsl:choose>
-
-
- </xsl:function>
-
- <xsl:function name="p5frc:targetNamespace.name">
- <xsl:param name="p5dkp:xsd.root.node"/>
- <xsl:choose>
- <xsl:when test="not($p5frc:targetNamespace.name='')">
- <xsl:value-of select="$p5frc:targetNamespace.name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="string-length($p5dkp:xsd.root.node/schema/namespace::*[. = p5frc:targetNamespace($p5dkp:xsd.root.node)]/name()) = 0">
- <xsl:message terminate="yes">#159 cannot detect p5frc:targetNamespace.name - for better safety type $p5frc:targetNamespace.name parameter as default</xsl:message>
- </xsl:if>
- <xsl:value-of select="$p5dkp:xsd.root.node/schema/namespace::*[. = p5frc:targetNamespace($p5dkp:xsd.root.node)]/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:otherwise>
- </xsl:choose>
-
-
-
- </xsl:function>
-
- <xsl:template match="element[ descendant::system_cache__appinfo:source]" mode="p5frc:map.budzet_rola.xsl.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" priority="9">
- <xsl:comment>#45 <xsl:copy-of select="@*"/> /*/name = <xsl:value-of select="/*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ../name() = <xsl:value-of select="../name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>; ancestor/names = <xsl:value-of select="ancestor::*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:comment>
- <xsl:if test="number($p5frc:debug) > 4">
- <xsl:message>#45 <xsl:copy-of select="@*"/> /*/name = <xsl:value-of select="/*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ../name() = <xsl:value-of select="../name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>; ancestor/names = <xsl:value-of select="ancestor::*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:message>
-
- </xsl:if>
- <xsl:comment>#139</xsl:comment>
- <xsl:element name="xsl:template">
- <xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply.root'"/>
- <!--<xsl:apply-templates mode="p5frc:derived.mode" select=".">
- <xsl:with-param name="mode.default" select="'p5frc:map.budzet_rola.xsl.apply.root'"/>
- </xsl:apply-templates>-->
- <xsl:attribute name="match" select="@name"/>
- <!--<xsl:apply-templates mode="p5frc:derived.match" select="."/>-->
- <xsl:attribute name="xpath-default-namespace" select="ancestor::schema//@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:element name="xsl:param">
- <xsl:attribute name="name" select="'p5frc:nodes.path'"/>
- </xsl:element>
-
-
-
- <xsl:element name="xsl:copy">
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select" select="'@*'"/>
- </xsl:element>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'local'"/>
- <p5frc:local>
- <xsl:element name="xsl:apply-templates">
- <xsl:attribute name="mode" select="'p5dkp:map.budzet_rola.xml.local'"/>
- </xsl:element>
- </p5frc:local>
- </xsl:element>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'root'"/>
- <xsl:attribute name="select" select="'/'"/>
- </xsl:element>
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select">$local/p5frc:local/*[not(name()='map.keys.eval')]</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/>
- </xsl:element>
- <xsl:if test="number($p5frc:debug) > 3">
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select">$p5frc:nodes.path</xsl:attribute>
- </xsl:element>
- </xsl:if>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'element'"/>
- <xsl:attribute name="select">'<xsl:value-of select="@name"/>'</xsl:attribute>
- </xsl:element>
- <xsl:apply-templates mode="p5frc:map.budzet_rola.xsl.flat_relations"/>
- </xsl:element>
- </xsl:element>
- <xsl:comment>#186</xsl:comment>
- <xsl:element name="xsl:template">
- <!--<xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply'"/>-->
- <xsl:variable name="targetNamespace.detect" select="p5frc:targetNamespace(root())"/>
- <xsl:if test="number($p5frc:debug) > 44">
- <xsl:message>#184 select="concat(root()/schema/namespace::*[. = //@targetNamespace]/name(),':',@name)"
- //@targetNamespace = <xsl:value-of select="//@targetNamespace[1]"/>;
- <xsl:value-of select="root()/schema/namespace::*[. = //@targetNamespace[1]]/name()"/>
- root()/schema/@targetNamespace = <xsl:value-of select="root()/schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;
- $targetNamespace.detect = <xsl:value-of select="$targetNamespace.detect"/>;
- second tryXXX <xsl:value-of select="root()/schema/namespace::*[. = $targetNamespace.detect]/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- 5 <xsl:value-of select="root()/schema/namespace::*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- 7-ns <xsl:value-of select="root()//namespace::*/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- 7-nons <xsl:value-of select="root()//namespace::*/name()" />
- 8-self<xsl:value-of select="root()//namespace::*[ . = //@targetNamespace[1]]/name()" />
- 6 <xsl:value-of select="root()//namespace::*[. = $targetNamespace.detect]/name()" />
- #239 p5frc:targetNamespace(root()) = <xsl:value-of select="p5frc:targetNamespace(root())"/>
- #240 p5frc:targetNamespace.name(root()) = <xsl:value-of select="p5frc:targetNamespace.name(root())"/>
- </xsl:message>
- </xsl:if>
-
-
- <xsl:attribute name="mode" select="concat(p5frc:targetNamespace.name(root()),':',@name)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <!--<xsl:apply-templates mode="p5frc:derived.mode" select=".">
- <xsl:with-param name="mode.default" select="'p5frc:map.budzet_rola.xsl.apply'"/>
- </xsl:apply-templates>-->
- <!--<xsl:attribute name="match" select="@name"/>-->
- <xsl:apply-templates mode="p5frc:derived.match" select="."/>
- <xsl:attribute name="xpath-default-namespace" select="ancestor::schema//@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- <xsl:element name="xsl:param">
- <xsl:attribute name="name" select="'p5frc:nodes.path'"/>
- </xsl:element>
- <xsl:comment>#210</xsl:comment>
-
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'p5frc:derived.name'"/>
- <!--<xsl:apply-templates mode="p5frc:derived.name" select="." xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-->
- <xsl:value-of select="concat(p5frc:targetNamespace.name(root()),':',@name)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:element>
- <xsl:choose>
- <xsl:when test="@name = 'wymagania_no_required_finished'">
- <xsl:comment>#131 from p5dkp:wymaganie_no_required_finished</xsl:comment>
- </xsl:when>
- </xsl:choose>
- <!--<xsl:element name="xsl:copy">-->
- <xsl:element name="xsl:element">
- <xsl:attribute name="name">{$p5frc:derived.name}</xsl:attribute>
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select" select="'@*'"/>
- </xsl:element>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'local'"/>
- <p5frc:local>
- <xsl:element name="xsl:apply-templates">
- <xsl:attribute name="mode" select="'p5dkp:map.budzet_rola.xml.local.idref'"/>
- </xsl:element>
- </p5frc:local>
- </xsl:element>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'root'"/>
- <xsl:attribute name="select" select="'/'"/>
- </xsl:element>
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select">$local/p5frc:local/*[not(name()='map.keys.eval')]</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/>
- </xsl:element>
- <xsl:if test="number($p5frc:debug) > 3">
- <xsl:element name="xsl:copy-of">
- <xsl:attribute name="select">$p5frc:nodes.path</xsl:attribute>
- </xsl:element>
- </xsl:if>
- <xsl:element name="xsl:variable">
- <xsl:attribute name="name" select="'element'"/>
- <xsl:attribute name="select">'<xsl:value-of select="@name"/>'</xsl:attribute>
- </xsl:element>
-
-
- <xsl:apply-templates mode="p5frc:map.budzet_rola.xsl.flat_relations"/>
- </xsl:element>
-
-
- <!--</xsl:element>-->
-
- </xsl:element>
-
- </xsl:template>
-
-
-
- <xsl:template mode="p5frc:derived.ref" match="element[@ref]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="/schema/element[@name = substring-after(current()/substring-before(.//@system_cache__appinfo:xpath,'/'),':')]/.//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
-
- <xsl:value-of select="/schema/element[@name = substring-after(current()/@ref,':')]/.//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:when>
- <xsl:when test=".//@system_cache__appinfo:xpath" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="@ref"/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="p5frc:map.budzet_rola.xsl.child" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates mode="#current"/>
- </xsl:template>
-
- <xsl:template mode="p5frc:map.budzet_rola.xsl.child" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#94 ignored <xsl:value-of select="name()"/>; <xsl:copy-of select="@*"/>; descendant::system_cache__appinfo:source = <xsl:value-of select="descendant::system_cache__appinfo:source" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> </xsl:comment>
- <!--<DEBUG>
- <xsl:copy-of select="."/>
- </DEBUG>-->
- </xsl:template>
-
- <xsl:template match="*" mode="p5frc:map.budzet_rola.xsl.flat_relations" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:if test="number($p5frc:debug) > 7"><xsl:comment>#55 matched * <xsl:value-of select="name()"/>; <xsl:copy-of select="@*"/></xsl:comment></xsl:if>
- <!--<DEBUG55>
- <xsl:copy-of select="descendant::system_cache__appinfo:source"/>
- </DEBUG55>-->
- <xsl:apply-templates mode="p5frc:map.budzet_rola.xsl.flat_relations"/>
- </xsl:template>
-
- <xsl:template match="element[ @ref and descendant::system_cache__appinfo:source]" mode="p5frc:map.budzet_rola.xsl.flat_relations" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:comment>#60 matched element[ @ref and descendant::system_cache__appinfo:source] ; name()=<xsl:value-of select="name()"/>; <xsl:copy-of select="@*"/>;</xsl:comment>
- <xsl:element name="xsl:comment">
- #60 matched element[ @ref and descendant::system_cache__appinfo:source] ; name()=<xsl:value-of select="name()"/>; <xsl:copy-of select="@*/name()"/></xsl:element>
- <xsl:message>#60 matched element[ @ref and descendant::system_cache__appinfo:source] ; name()=<xsl:value-of select="name()"/>; <xsl:copy-of select="@*"/>;</xsl:message>
-
- <xsl:variable name="p5frc:derived">
- <xsl:apply-templates mode="p5frc:derived.ref" select="."/>
- </xsl:variable>
- <xsl:comment>#298 $p5frc:derived = <xsl:value-of select="$p5frc:derived"/>
- /schema/element[@name = substring-after(current()/substring-before(.//@system_cache__appinfo:xpath,'/'),':')]/p5frc:derived
- = <xsl:value-of select="/schema/element[@name = substring-after(substring-before(current()/.//@system_cache__appinfo:xpath,'/'),':')]/.//p5frc:derived" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- substring-after(substring-before(current().//@system_cache__appinfo:xpath,'/'),':') = <xsl:value-of select="substring-before(current()/.//@system_cache__appinfo:xpath,'/')" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
- </xsl:comment>
- <xsl:element name="xsl:for-each-group">
- <xsl:attribute name="select"><xsl:value-of select=".//@system_cache__appinfo:name"/></xsl:attribute> <!-- $local/p5frc:local/ -->
- <xsl:attribute name="xpath-default-namespace"/>
- <xsl:attribute name="group-by">concat(@p5dkp:id,@p5dkp:idref,@keyref)</xsl:attribute>
- <!--<TEST_FOR>-->
- <xsl:comment>
- #198-A TEST FOR EL=<xsl:value-of select=".//@system_cache__appinfo:name"/>;; <xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/> <xsl:copy-of select="@*"/> / <xsl:element name="xsl:copy-of"><xsl:attribute name="select">@*</xsl:attribute></xsl:element> and <xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/>
- pos = <xsl:value-of select="position()"/>
- </xsl:comment>
- <xsl:element name="xsl:comment">
- #198-B TEST FOR EL=<xsl:value-of select=".//@system_cache__appinfo:name"/>;; <xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/> p5dkp:idref=<xsl:element name="xsl:value-of"><xsl:attribute name="select">@p5dkp:idref</xsl:attribute></xsl:element> ; p5dkp:id=<xsl:element name="xsl:value-of"><xsl:attribute name="select">@p5dkp:id</xsl:attribute></xsl:element> ; @keyref=<xsl:element name="xsl:value-of"><xsl:attribute name="select">@keyref</xsl:attribute></xsl:element> ; position <xsl:element name="xsl:value-of"><xsl:attribute name="select">position()</xsl:attribute></xsl:element>
- </xsl:element>
-
-
- <xsl:element name="xsl:choose">
- <xsl:element name="xsl:when">
- <xsl:attribute name="test">$p5frc:nodes.path and $p5frc:nodes.path//<xsl:value-of select=".//@system_cache__appinfo:name"/>[ @p5dkp:element = $element ]/@keyref = current()/(@keyref|@p5dkp:id) </xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/>
- <xsl:element name="xsl:comment">#2009-A Element @keyref=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@keyref</xsl:attribute></xsl:element> exists .</xsl:element>
- </xsl:element>
- <xsl:element name="xsl:when">
- <xsl:attribute name="test">$p5frc:nodes.path and $p5frc:nodes.path//<xsl:value-of select=".//@system_cache__appinfo:name"/>[ @p5dkp:element = $element ]/@p5dkp:id = current()/(@p5dkp:id|@keyref)</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/>
- <xsl:element name="xsl:comment">#2009-B Element @p5dkp:id=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@p5dkp:id</xsl:attribute></xsl:element> exists .</xsl:element>
- </xsl:element>
- <xsl:element name="xsl:when">
- <xsl:attribute name="test">$p5frc:nodes.path and count($p5frc:nodes.path//*) > 5</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/>
- <xsl:element name="xsl:comment">#2009-X COUNT EXCEED Element @p5dkp:id=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@p5dkp:id</xsl:attribute></xsl:element> NOR @keyref=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@keyref</xsl:attribute></xsl:element> .</xsl:element>
- </xsl:element>
- <xsl:element name="xsl:otherwise">
- <xsl:element name="xsl:comment">#2009-C Element @p5dkp:id=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@p5dkp:id</xsl:attribute></xsl:element> NOR @keyref=<xsl:element name="xsl:value-of"><xsl:attribute name="select">current()/@keyref</xsl:attribute></xsl:element> NOT EXISTS .</xsl:element>
-
- <xsl:element name="xsl:apply-templates">
- <!--<xsl:attribute name="mode" select="@ref"/>-->
- <!--<xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply'"/>-->
- <xsl:attribute name="mode" select="substring-before(.//@system_cache__appinfo:xpath,'/')"/>
- <!--<xsl:attribute name="mode" select="$p5frc:derived"/>-->
- <!--<xsl:attribute name="select">$root//<xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/>[ * [local-name()='<xsl:value-of select="substring-after(.//@system_cache__appinfo:xpath,'/')"/>' and @p5dkp:id = current()/@keyref or @keyref = current()/@p5dkp:id ]]</xsl:attribute>-->
- <xsl:attribute name="select">$root//<xsl:value-of select="$p5frc:derived"/>[ * [local-name()='<xsl:value-of select="substring-after(.//@system_cache__appinfo:xpath,'/')"/>' and @p5dkp:id = current()/@keyref or @keyref = current()/@p5dkp:id ]]</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/> <!-- select="root()//@targetNamespace" -->
- <!--<xsl:attribute name="xpath-default-namespace" select="root()//@targetNamespace"/>-->
- <xsl:comment>#105 <xsl:copy-of select="@*"/></xsl:comment>
- <xsl:element name="xsl:with-param">
- <xsl:attribute name="name" select="'p5frc:nodes.path'"/>
- <xsl:attribute name="select">p5dkp:nodes.path.add($p5frc:nodes.path,.,$element)</xsl:attribute>
- </xsl:element>
- </xsl:element>
-
-
- </xsl:element>
- </xsl:element>
-
-
-
-
-
- <!--</TEST_FOR>-->
- </xsl:element>
- <!--<xsl:element name="xsl:apply-templates">
- <!-\-<xsl:attribute name="mode" select="@ref"/>-\->
- <xsl:attribute name="mode" select="'p5frc:map.budzet_rola.xsl.apply'"/>
-
- <xsl:attribute name="select">//<xsl:value-of select="substring-before(.//@system_cache__appinfo:xpath,'/')"/>[ * [local-name()='<xsl:value-of select="substring-after(.//@system_cache__appinfo:xpath,'/')"/>' and @p5dkp:id = $local/p5frc:local/<xsl:value-of select=".//@system_cache__appinfo:name"/>/@keyref or @keyref = $local/p5frc:local/<xsl:value-of select=".//@system_cache__appinfo:name"/>/@p5dkp:id ]]</xsl:attribute>
- <xsl:attribute name="xpath-default-namespace"/> <!-\- select="root()//@targetNamespace" -\->
- <!-\-<xsl:attribute name="xpath-default-namespace" select="root()//@targetNamespace"/>-\->
- <xsl:comment>#105 <xsl:copy-of select="@*"/></xsl:comment>
- <xsl:element name="xsl:with-param">
- <xsl:attribute name="name" select="'p5frc:nodes.path'"/>
- <xsl:attribute name="select">p5dkp:nodes.path.add($p5frc:nodes.path,<xsl:value-of select=".//@system_cache__appinfo:name"/>)</xsl:attribute>
- </xsl:element>
- </xsl:element>-->
- </xsl:template>
-
- <xsl:template mode="p5frc:map.budzet_rola.xsl.flat_relations" match="text()|comment()"/>
-
- <xsl:template mode="p5frc:map.budzet_rola.xsl.child" match="text()|comment()"/>
-
- </xsl:stylesheet>
|