home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / request-to-svg.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.1 KB  |  59 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.   Copyright 1999-2004 The Apache Software Foundation
  5.  
  6.   Licensed under the Apache License, Version 2.0 (the "License");
  7.   you may not use this file except in compliance with the License.
  8.   You may obtain a copy of the License at
  9.  
  10.       http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12.   Unless required by applicable law or agreed to in writing, software
  13.   distributed under the License is distributed on an "AS IS" BASIS,
  14.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.   See the License for the specific language governing permissions and
  16.   limitations under the License.
  17. -->
  18.  
  19. <!-- Convert RequestGenerator output to SVG -->
  20.  
  21. <xsl:stylesheet
  22.     version="1.0"
  23.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  24.     xmlns:h="http://apache.org/cocoon/request/2.0"
  25.     >
  26.  
  27.     <xsl:param name="fillColor" select="'#330000'"/>
  28.  
  29.     <xsl:template id="main" match="/">
  30.         <svg width="600" height="500">
  31.             <defs>
  32.                 <filter id="blur1">
  33.                     <feGaussianBlur stdDeviation="3"/>
  34.                 </filter>
  35.                 <filter id="blur2">
  36.                     <feGaussianBlur stdDeviation="1"/>
  37.                 </filter>
  38.             </defs>
  39.  
  40.             <g title="this is a tooltip">
  41.                 <rect
  42.                     style="{concat('fill:',$fillColor,';stroke:#000000;stroke-width:4;filter:url(#blur1);')}"
  43.                     x="30" y="30" rx="20" ry="20" width="500" height="400"/>
  44.                 <text style="fill:#FFFFFF;font-size:24;font-family:TrebuchetMS-Bold;filter:url(#blur2);" x="65" y="80">
  45.                     <xsl:value-of select="concat('color:',$fillColor)"/>
  46.                 </text>
  47.                 <xsl:apply-templates select="//h:header[position() < 5]"/>
  48.             </g>
  49.         </svg>
  50.     </xsl:template>
  51.  
  52.     <xsl:template match="h:header">
  53.         <text style="fill:#FFFFFF;font-size:24;font-family:TrebuchetMS-Bold;filter:url(#blur2);" x="65" y="{40 * (2 + position())}">
  54.             <xsl:value-of select="concat(@name,':',.)"/>
  55.         </text>
  56.     </xsl:template>
  57.  
  58. </xsl:stylesheet>
  59.