| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
- exclude-result-prefixes="xs xsi p5dkp"
- version="2.0">
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:param name="basedir"/>
-
- <xsl:include href="p5dkp.ditafiles.func.isditafile.xsl"/>
-
- <xsl:template match="p5dkp:ditafiles.xml" mode="p5dkp:to.dtd.xml">
- <p5dkp:to.dtd.xml>
- <xsl:message>#15 started p5dkp:to.dtd.xml</xsl:message>
- <xsl:for-each-group select="//p5dkp:ditafiles.file" group-by="@p5dkp:true.path">
- <xsl:copy copy-namespaces="no">
- <xsl:copy-of select="@p5dkp:true.path"/>
- <xsl:copy-of select="@xsi:noNamespaceSchemaLocation"/>
- <xsl:choose>
- <xsl:when test="not(p5dkp:ditafiles.func.isditafile(@p5dkp:true.path))">
- <xsl:message>#22 not(p5dkp:ditafiles.func.isditafile(<xsl:value-of select="@p5dkp:true.path"/>))</xsl:message>
- </xsl:when>
- <xsl:when test="doc-available(@p5dkp:true.path)" >
- <xsl:message>#22 testing <xsl:value-of select="@p5dkp:true.path"/>; </xsl:message>
- <xsl:apply-templates mode="p5dkp:to.dtd" select="doc(@p5dkp:true.path)">
- <xsl:with-param name="p5dkp:true.path" select="@p5dkp:true.path"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <doc-unaviable-available p5dkp:true.path="{@p5dkp:true.path}"/>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:copy>
- </xsl:for-each-group>
- </p5dkp:to.dtd.xml>
- </xsl:template>
-
-
-
-
- <xsl:template mode="p5dkp:to.dtd.confirm.MacroDef.xml" match="p5dkp:to.dtd.xml">
- <project basedir="{$basedir}" name="p5dkp.to.dtd.confirm.MacroDef.xml" default="p5dkp.to.dtd.confirm.MacroDef.xml"> <!-- object_merge_ant_object.merge.try.build.xml -->
- <!--<include file="{$object_modeling_new.build.xml}" as="object_modeling_new"/>
- <include file="{$object_merge_ant_object.build.xml}" as="object_merge_ant_object"/>-->
- <macrodef name="p5dkptodtdconfirmMacroDef">
- <attribute name="srcfile"/>
- <attribute name="dstfile" />
- <sequential>
- <move verbose="yes" failonerror="false">
- <xsl:attribute name="file">@{srcfile}</xsl:attribute>
- <xsl:attribute name="tofile">@{dstfile}</xsl:attribute>
- </move>
- </sequential>
- </macrodef>
- <target name="p5dkp.to.dtd.confirm.MacroDef.xml">
- <!--<p5dkptodtdconfirmMacroDef>-->
- <xsl:for-each select="p5dkp:ditafiles.file[p5dkp:to.dtd]">
- <p5dkptodtdconfirmMacroDef srcfile="{p5dkp:to.dtd/@fixed_to.dtd}" dstfile="{p5dkp:to.dtd/@p5dkp:true.path}" />
- </xsl:for-each>
- <!--</p5dkptodtdconfirmMacroDef>-->
- </target>
- </project>
-
- </xsl:template>
-
-
- <xsl:template match="*[ not(@xsi:noNamespaceSchemaLocation)]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <xsl:message >#45 not matched name = <xsl:value-of select="name()"/></xsl:message>
- <p5dkp:to.dtd.not_fixed>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- </p5dkp:to.dtd.not_fixed>
- </xsl:template>
-
-
- <xsl:template match="node()[ name() = 'map' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd')"/>
- </p5dkp:to.dtd>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd.xml" doctype-public="-//OASIS//DTD DITA Map//EN" doctype-system="map.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp:to.dtd" match="*|text()|comment()"/>
-
- <xsl:template match="@*" mode="p5dkp:to.dtd.child">
- <xsl:copy-of select="."/>
- </xsl:template>
- <xsl:template match="@xsi:noNamespaceSchemaLocation" mode="p5dkp:to.dtd.child"/>
-
-
- <xsl:template match="*|text()|comment()" mode="p5dkp:to.dtd.child">
- <xsl:copy-of select="." copy-namespaces="no"/>
- </xsl:template>
-
- <xsl:template match="node()[ name() = 'topic' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Topic//EN" doctype-system="topic.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
-
- <xsl:template match="node()[ name() = 'glossgroup' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Glossary Group//EN" doctype-system="glossgroup.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
-
- <xsl:template match="node()[ name() = 'glossentry' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Glossary//EN" doctype-system="glossary.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
- <xsl:template match="node()[ name() = 'concept' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Concept//EN" doctype-system="concept.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
- <xsl:template match="node()[ name() = 'reference' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Reference//EN" doctype-system="reference.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
- <xsl:template match="node()[ name() = 'task' and @xsi:noNamespaceSchemaLocation]" mode="p5dkp:to.dtd">
- <xsl:param name="p5dkp:true.path" required="yes"/>
- <p5dkp:to.dtd>
- <xsl:attribute name="p5dkp:true.path" select="$p5dkp:true.path"/>
- <xsl:attribute name="fixed_to.dtd" select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/>
- </p5dkp:to.dtd>
- <xsl:message >#300 matched name = <xsl:value-of select="name()"/> and saved to <xsl:value-of select="concat($p5dkp:true.path,'.fixed_to.dtd.xml')"/></xsl:message>
- <xsl:result-document href="{$p5dkp:true.path}.fixed_to.dtd" doctype-public="-//OASIS//DTD DITA Task//EN" doctype-system="task.dtd">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates select="@*" mode="p5dkp:to.dtd.child"/>
- <xsl:apply-templates mode="p5dkp:to.dtd.child"/>
- </xsl:copy>
- </xsl:result-document>
- </xsl:template>
-
- </xsl:stylesheet>
|