| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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"
- exclude-result-prefixes="xs"
- version="2.0">
-
- <!-- 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 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>
|