[Sie-announce] SIEコード [1084] ieとfirefoxの判別式を加えた

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 3月 16日 (月) 19:44:46 JST


Revision: 1084
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1084
Author:   dhrname
Date:     2009-03-16 19:44:46 +0900 (Mon, 16 Mar 2009)

Log Message:
-----------
ieとfirefoxの判別式を加えた

Modified Paths:
--------------
    trunk/sie.xsl

Modified: trunk/sie.xsl
===================================================================
--- trunk/sie.xsl	2009-03-15 14:14:11 UTC (rev 1083)
+++ trunk/sie.xsl	2009-03-16 10:44:46 UTC (rev 1084)
@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:msxsl="urn:schemas-microsoft-com:xslt"
-version="1.0">
-  <xsl:output indent="yes" method="html" omit-xml-declaration="no" />
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0">
+<xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+<xsl:variable name="node-set" select="function-available('xsl:node-set')"/>
+  <xsl:output indent="yes" method="xml" omit-xml-declaration="no" media-type="image/svg+xml"/>
 <xsl:template match="/">
+<xsl:choose>
+<xsl:when test="$vendor='Microsoft'">
   <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
     <head>
       <title><xsl:value-of select="title" /></title>
@@ -13,10 +15,22 @@
       <script type="image/svg+xml" width="1000px" height="1000px"><xsl:apply-templates /></script>
    </body>
    </html>
+</xsl:when>
+<xsl:when test="$vendor='Transformiix' and $node-set">
+ <xsl:apply-templates />
+</xsl:when>
+</xsl:choose>
 </xsl:template>
 <xsl:template match="*|@*|text()">
+<xsl:choose>
+<xsl:when test="$vendor='Microsoft'">
     <xsl:copy>
       <xsl:apply-templates select="*|@*|text()"/>
     </xsl:copy>
+</xsl:when>
+<xsl:when test="$vendor='Transformiix' and $node-set">
+ <xsl:apply-templates />
+</xsl:when>
+</xsl:choose>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file




Sie-announce メーリングリストの案内
Back to archive index