Changeset 2798
- Timestamp:
- 03/25/08 14:53:53 (8 months ago)
- Files:
-
- trunk/projects/bos/tmp/kml.xsl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/projects/bos/tmp/kml.xsl
r2776 r2798 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 xmlns:kml="http://earth.google.com/kml/2.1"4 xmlns:bos="http://headcraft.de/bos"5 version="1.0">3 xmlns:kml="http://earth.google.com/kml/2.1" 4 xmlns:bos="http://headcraft.de/bos" 5 version="1.0"> 6 6 <xsl:output method="html"/> 7 7 8 <xsl:template match="/"> 8 9 <html xmlns="http://www.w3.org/1999/xhtml"> … … 16 17 </html> 17 18 </xsl:template> 18 19 20 <!-- language setting --> 21 <xsl:param name="lang" select="'de'"/> 22 <!-- server --> 23 <xsl:param name="server" select="'http://test.createrainforest.org'"/> 24 <!-- image_width --> 25 <xsl:param name="image_width" select="60"/> 26 19 27 <xsl:template match="kml:Placemark"> 20 <!-- images here <img/><img/><img/> -->21 28 <table style="background-color: rgb(186, 186, 186); width: 319px; height: 350px;" border="0" cellpadding="5" cellspacing="0"> 22 29 <tbody> 23 30 <tr> 24 <td colspan="3" style="width: 99px; text-align: left;"> 25 Create Rainforest Banner / BOS Logo31 <td colspan="3" style="width: 99px; text-align: left;"> 32 <img src="{$server}/images/header_ganzneu.gif" alt="Create Rainforest Banner / BOS Logo" width="400"/> 26 33 </td> 27 </tr> 34 </tr> 28 35 <tr> 29 36 <td style="width: 100px;"> 30 <a href=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#">31 <img style="border: 0px solid ;" alt="Galerie" src=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#"/>37 <a href="{$server}/infosystem/en/satellitenkarte.htm#"> 38 <img style="border: 0px solid ;" alt="Galerie" src="{$server}/infosystem/en/satellitenkarte.htm#"/> 32 39 <br/> Galerie Slidwshow</a></td><td style="width: 33%;"> 33 <a href=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#">34 <img style="border: 0px solid ;" alt="Panorama-klein" src=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#"/>35 <br/>Panorama-Mini</a></td><td style="width: 33%;"> <a href=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#">36 <img style="border: 0px solid ;" alt="Video" src=" http://createrainforest.org/infosystem/en/satellitenkarte.htm#"/>40 <a href="{$server}/infosystem/en/satellitenkarte.htm#"> 41 <img style="border: 0px solid ;" alt="Panorama-klein" src="{$server}/infosystem/en/satellitenkarte.htm#"/> 42 <br/>Panorama-Mini</a></td><td style="width: 33%;"> <a href="{$server}/infosystem/en/satellitenkarte.htm#"> 43 <img style="border: 0px solid ;" alt="Video" src="{$server}/infosystem/en/satellitenkarte.htm#"/> 37 44 <br/>Video</a></td></tr><tr><td style="width: 33%;" colspan="3"> 38 <h1><xsl:value-of select="kml:name"/></h1> 39 <div style="text-align: justify;"> 40 <xsl:value-of select="descendant::bos:description/bos:content[@lang='en']"/> 41 <a href="http://createrainforest.org/en/index">learn more</a></div> 42 </td></tr><tr><td style="width: 99px;" colspan="3" align="center" valign="middle"> 43 <font color="#999999"><a href="http://createrainforest.org/en/index">create rainforest</a> 44 | copyright</font> 45 </td></tr></tbody></table> 45 <h1><xsl:value-of select="descendant::bos:title/bos:content[@lang=$lang]"/></h1> 46 <h2><xsl:value-of select="descendant::bos:subtitle/bos:content[@lang=$lang]"/></h2> 47 <div style="text-align: left;"> 48 <xsl:value-of select="descendant::bos:description/bos:content[@lang=$lang]"/> 49 <a href="{$server}/en/index">learn more</a></div> 50 <xsl:apply-templates select="descendant::bos:image"/> 51 </td></tr><tr><td style="width: 99px;" colspan="3" align="center" valign="middle"> 52 <font color="#999999"><a href="{$server}/en/index">create rainforest</a> 53 | copyright</font> 54 </td></tr></tbody></table> 46 55 <p/> 47 56 </xsl:template> 48 57 58 <xsl:template match="bos:image"> 59 <xsl:param name="id" select="bos:id"/> 60 <xsl:param name="aspect_ratio" select="bos:width div bos:height"/> 61 <!-- <xsl:message>val:<xsl:value-of select="$aspect_ratio"/></xsl:message> --> 62 <xsl:param name="w" select="$image_width"/> 63 <xsl:param name="h" select="$aspect_ratio * $w"/> 64 <img src="{$server}/image/{$id}" width="{$w}" height="{$h}"/> 65   66 </xsl:template> 49 67 </xsl:stylesheet> 50 68
