| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <?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:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
-
- <!-- parsed by default_db_xml_cache.public/system_cache__appinfo/postprocess.xsl
- by: executed by WPS_Functions/default_db/CRM_PROCES_tree/build_CRM_PROCES_tree.xml target name="default_db:PROCES_INIT:tree:dita"
- and public_html/default_db_xml_cache.public/default_db/tree_to_dita.xsl
- -->
-
- <!-- Do parsowania <images>
- <image x="1" y="1">
- <xmin>6525000.91100983333333333345</xmin>
- <ymin>6012859.46859783333333333345</ymin>
- <xmax>6525085.57767650000000000000</xmax>
- <ymax>6012944.13526450000000000000</ymax>
- <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
- </image>
- <image x="2" y="1">
- <xmin>6525080.57767650000000000000</xmin>
- <ymin>6012859.46859783333333333345</ymin>
- <xmax>6525165.24434316666666666655</xmax>
- <ymax>6012944.13526450000000000000</ymax>
- <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-2.png</file>
- </image>
- <image x="1" y="2">
- <xmin>6525000.91100983333333333345</xmin>
- <ymin>6012939.13526450000000000000</ymin>
- <xmax>6525085.57767650000000000000</xmax>
- <ymax>6013023.80193116666666666655</ymax>
- <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-1.png</file>
- </image>
- <image x="2" y="2">
- <xmin>6525080.57767650000000000000</xmin>
- <ymin>6012939.13526450000000000000</ymin>
- <xmax>6525165.24434316666666666655</xmax>
- <ymax>6013023.80193116666666666655</ymax>
- <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-2-2.png</file>
- </image>
- </images>
- -->
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
-
- <xsl:template match="*" mode="system_cache__dita:postprocess_image_convert">
- <xsl:param name="ext" select="substring-after(TYPE,'/')"/>
- <xsl:param name="fileindex" select="ID"/>
- <base64_to_image srcfile="{$temp}/{$uuid}/{ID}_image.base64.{$ext}" dstfile="{$temp}/{$uuid}/{ID}_image.{$ext}" />
- </xsl:template>
-
-
- <xsl:template match="*" mode="system_cache__dita:process_image">
- <xsl:param name="width" required="yes"/>
- <xsl:param name="ext" select="substring-after(TYPE,'/')"/>
- <xsl:param name="fileindex" select="ID"/>
- <xsl:choose>
- <xsl:when test="number($width) > 600">
- <image href="{$fileindex}_image.{$ext}" width="500"></image>
- </xsl:when>
- <xsl:otherwise>
- <image href="{$fileindex}_image.{$ext}" width="{$width}"></image>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template match="*" mode="system_cache__dita:postprocess_image">
- <xsl:param name="ext" select="substring-after(TYPE,'/')"/>
- <xsl:param name="fileindex" select="ID"/>
- <xsl:result-document href="{$temp}/{$uuid}/{ID}_image.base64.{$ext}" omit-xml-declaration="yes">
- <xsl:value-of select="IMAGE/text()"/>
- </xsl:result-document>
- <xsl:apply-templates mode="system_cache__dita:postprocess_image_convert" select=".">
- <xsl:with-param name="ext" select="$ext"/>
- <xsl:with-param name="fileindex" select="$fileindex"/>
- </xsl:apply-templates>
- </xsl:template>
-
- <!-- IMAGES - gml!!! -->
-
-
-
- <xsl:template mode="system_cache__dita:preprocess_images" match="*">
- <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
- <xsl:comment>#90 system_cache__dita:preprocess_images</xsl:comment>
-
- <xsl:apply-templates mode="system_cache__dita:preprocess_images__write" select=".">
- <xsl:with-param name="fileindex" select="$fileindex"/>
- </xsl:apply-templates>
- <xsl:result-document href="{$ditadir}/{$fileindex}.gml">
- <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"
- xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:default_objects="https://biuro.biall-net.pl/wfs/ault_objects">
- <xsl:attribute name="local-name" select="local-name()"/>
- <gml:featureMember>
- <xsl:copy-of select="." copy-namespaces="no"/>
- </gml:featureMember>
- </wfs:FeatureCollection>
- <!--<xsl:apply-templates mode="preprocess_gml_geometry_image" select="."/>-->
- </xsl:result-document>
-
-
- <!-- podsumwoania po stanach -->
-
-
- </xsl:template>
-
-
- <xsl:template mode="system_cache__dita:preprocess_images__write" match="*">
- <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
- <gml_to_image srcfile="{$ditadir}/{$fileindex}.gml" dstfile="{$ditadir}/{$fileindex}.png.xml" fileindex="{$fileindex}" ditadir="{$ditadir}"/>
- </xsl:template>
-
- <xsl:template mode="system_cache__dita:images__read" match="*">
- <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
- <!-- to read and parse system_cache__appinfo:images -->
- <!--<xsl:variable name="fileindex" select="concat(ID,'_',local-name())"/>-->
- <xsl:choose>
- <xsl:when test="doc-available(concat($ditadir,'/',$fileindex,'.png.xml'))">
- <xsl:apply-templates mode="system_cache__appinfo:images" select="doc(concat($ditadir,'/',$fileindex,'.png.xml'))">
- <xsl:with-param name="fileindex" select="$fileindex"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:comment>
- <xsl:message>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
-
-
-
-
-
- <!-- EOF IMAGES - gml!!! -->
-
-
- <xsl:template mode="system_cache__appinfo:images" match="images">
- <xsl:param name="fileindex" required="yes"/> <!-- ex. 3161_IN7_MK_BAZA_DYSTRYBUCJI - is related dir in dita dir with images -->
- <xsl:apply-templates mode="system_cache__appinfo:images">
- <xsl:with-param name="fileindex" select="$fileindex"/>
- </xsl:apply-templates>
- </xsl:template>
-
-
- <xsl:template mode="system_cache__appinfo:images" match="image[@x and @y]">
- <xsl:param name="fileindex" required="yes"/>
- <image href="{$fileindex}/{$fileindex}_image-{@x}-{@y}.png" width="300"/>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:images" match="*">
- <xsl:message terminate="yes">#56 not expected data - needed @x and @y to be in xml image element: correct is:
- <image x="1" y="1">
- <xmin>6525000.91100983333333333345</xmin>
- <ymin>6012859.46859783333333333345</ymin>
- <xmax>6525085.57767650000000000000</xmax>
- <ymax>6012944.13526450000000000000</ymax>
- <file>/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/mapserver_gml_to_png/map/image-1-1.png</file>
- </image>
- </xsl:message>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:images__write" match="*">
- <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
- <gml_to_image srcfile="{$ditadir}/{$fileindex}.gml" dstfile="{$ditadir}/{$fileindex}.png.xml" fileindex="{$fileindex}" ditadir="{$ditadir}"/>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:images__read" match="*">
- <xsl:param name="fileindex" select="concat(ID,'_',local-name())"/>
- <!-- to read and parse system_cache__appinfo:images -->
- <!--<xsl:variable name="fileindex" select="concat(ID,'_',local-name())"/>-->
- <xsl:choose>
- <xsl:when test="doc-available(concat($ditadir,'/',$fileindex,'.png.xml'))">
- <xsl:apply-templates mode="system_cache__appinfo:images" select="doc(concat($ditadir,'/',$fileindex,'.png.xml'))">
- <xsl:with-param name="fileindex" select="$fileindex"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:comment>
- <xsl:message>#83 doc not aviable <xsl:value-of select="concat($ditadir,'/',$fileindex,'.png.xml')"/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- </xsl:stylesheet>
|