Author: post
Date: 2009-08-11 19:56:59 +0200 (Tue, 11 Aug 2009)
New Revision: 114

Modified:
   showcameras.xsl
Log:
- Xsl sheet now works in Firefox/Linux.
- Display correct position of CFA colors (in color)
- Cleanup/Better formatting.

Modified: showcameras.xsl
===================================================================
--- showcameras.xsl     2009-08-11 16:34:49 UTC (rev 113)
+++ showcameras.xsl     2009-08-11 17:56:59 UTC (rev 114)
@@ -4,8 +4,7 @@
 <xsl:output method = "html" indent = "yes" />
 <xsl:template match="/">
 
-
-<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns="http://www.w3.org/1999/xhtml";>
+<html>
        <head>
                <title>Known RawSpeed Cameras</title>
                <style type="text/css">
@@ -26,38 +25,43 @@
                        }
                </style>
        </head>
-       
-  <body>
+
+       <body>
                <h1>Known RawSpeed Cameras</h1>
-    <xsl:for-each select="Cameras/Camera">
+               <xsl:for-each select="Cameras/Camera">
                <xsl:sort data-type = "text" select = "concat(@make,@model)"/>
-      <h2>
-        <span style="font-weight:bold"><xsl:value-of select="@make"/></span>
-        - <xsl:value-of select="@model"/>
-          <xsl:if test="@mode != ''">, Mode: <span 
style="font-style:italic;"><xsl:value-of select="@mode"/></span></xsl:if>
-      </h2>
-      <div class="text">
-        <xsl:variable name = "supported" ><xsl:value-of 
select="@supported"/></xsl:variable>
-         <xsl:if test ="$supported = 'no'">Supported:<span 
style="color:red;font-style:italic;">No.</span></xsl:if>
-         <xsl:if test ="not($supported = 'no')">Supported:<span 
style="color:green;font-style:italic;">Yes.</span>
-                                <br/>
-                                Cropped Image Size: <span 
class="param"><xsl:value-of select="Crop/@width"/>x<xsl:value-of 
select="Crop/@height"/></span> pixels.
-                                <br/>
-                                Crop Top-Left: <span 
class="param"><xsl:value-of select="Crop/@x"/>,<xsl:value-of select="Crop/@y"/> 
pixels.</span>
-                                <br/>
-                                Sensor Black: <span 
class="param"><xsl:value-of select="Sensor/@black"/></span>, White:
-                                <span class="param"><xsl:value-of 
select="Sensor/@white"/>.</span>
-                                <br/>
-                                Sensor Colors:
-                                <xsl:for-each select="CFA/Color">
-                                               <span 
class="param">[<xsl:value-of select="."/>]</span> 
-                                </xsl:for-each>.
+                       <h2>
+                               <span style="font-weight:bold"><xsl:value-of 
select="@make"/></span>
+                               - <xsl:value-of select="@model"/>
+                       </h2>
+                       <div class="text">
+                               <xsl:variable name = "supported" ><xsl:value-of 
select="@supported"/></xsl:variable>
+                               <xsl:if test ="$supported = 'no'">Supported: 
<span style="color:red;font-style:italic;">No.</span></xsl:if>
+                                       <xsl:if test ="not($supported = 
'no')">Supported: <span style="color:green;font-style:italic;">Yes.</span>
+                                       <br/>
+                                       Cropped Image Size: <span 
class="param"><xsl:value-of select="Crop/@width"/>x<xsl:value-of 
select="Crop/@height"/></span> pixels.
+                                       <br/>
+                                       Crop Top-Left: <span 
class="param"><xsl:value-of select="Crop/@x"/>,<xsl:value-of select="Crop/@y"/> 
pixels.</span>
+                                       <br/>
+                                       Sensor Black: <span 
class="param"><xsl:value-of select="Sensor/@black"/></span>, White:
+                                       <span class="param"><xsl:value-of 
select="Sensor/@white"/>.</span>
+                                       <br/>
+                                       Uncropped Sensor Colors Positions:<br/>
+                                       <xsl:for-each select="CFA/Color">
+                                               <xsl:sort data-type = "number" 
select = "@y...@x"/>
+                                               <xsl:variable name = "color" 
><xsl:value-of select="."/></xsl:variable>
+                                               <xsl:if 
test="position()=last()-1"><br/></xsl:if>                                       
        
+                                               <xsl:if test ="$color = 
'RED'"><span class="param" style="color:red;">[<xsl:copy-of select="$color" 
/>]</span></xsl:if>
+                                               <xsl:if test ="$color = 
'GREEN'"><span class="param" style="color:green;">[<xsl:copy-of select="$color" 
/>]</span></xsl:if>
+                                               <xsl:if test ="$color = 
'BLUE'"><span class="param" style="color:blue;">[<xsl:copy-of select="$color" 
/>]</span></xsl:if>
+                                       </xsl:for-each>
                                 </xsl:if>
-      </div>
+                       </div>
                 <br/>
-       </xsl:for-each>
-  </body>
+               </xsl:for-each>
+
+       </body>
 </html>
+
 </xsl:template>
-
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to