W3C home > Mailing lists > Public > public-html-commits@w3.org > February 2010

html5/markup/tools generate-spec-source.xsl,1.236,1.237

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 10 Feb 2010 12:49:11 +0000
To: public-html-commits@w3.org
Message-Id: <E1NfC0F-0006rp-JB@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv25525/tools

Modified Files:
	generate-spec-source.xsl 
Log Message:
checkpointing + added some DOM interfaces

Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- generate-spec-source.xsl	8 Feb 2010 10:17:27 -0000	1.236
+++ generate-spec-source.xsl	10 Feb 2010 12:49:09 -0000	1.237
@@ -816,17 +816,17 @@
             <xsl:text>&#10;      </xsl:text>
             <h2>Acknowledgments</h2>
             <xsl:text>&#10;      </xsl:text>
-            <p>Parts of this document were programatically
-              generated from a modified version of a
-              RELAX NG schema for HTML5 from the <a
-                href="http://syntax.whattf.org/relaxng/"
-                >syntax.whattf.org source repository</a>,
-              distributed with the following copyright notice and
-              license statement:</p>
-            <xsl:text>&#10;      </xsl:text>
-            <pre class="license"><xsl:copy-of
-                select="document('../LICENSE.xml')/license/node()"/></pre>
-            <xsl:text>&#10;      </xsl:text>
+            <!-- * <p>Parts of this document were programatically -->
+              <!-- * generated from a modified version of a -->
+              <!-- * RELAX NG schema for HTML5 from the <a -->
+                <!-- * href="http://syntax.whattf.org/relaxng/" -->
+                <!-- * >syntax.whattf.org source repository</a>, -->
+              <!-- * distributed with the following copyright notice and -->
+              <!-- * license statement:</p> -->
+            <!-- * <xsl:text>&#10;      </xsl:text> -->
+            <!-- * <pre class="license"><xsl:copy-of -->
+                <!-- * select="document('../LICENSE.xml')/license/node()"/></pre> -->
+            <!-- * <xsl:text>&#10;      </xsl:text> -->
             <p>This document incorporates a modified version of a 
               <a
                 href="http://svn.webkit.org/repository/webkit/trunk/WebCore/css/html.css"
@@ -1229,6 +1229,18 @@
         </xsl:call-template>
         <xsl:text>&#10;      </xsl:text>
         <!-- * ***************************************************************** -->
+        <!-- * * MAKE "DETAILS" SECTION -->
+        <!-- * ***************************************************************** -->
+        <xsl:call-template name="make.details.section">
+          <xsl:with-param name="name" select="$name"/>
+        </xsl:call-template>
+        <!-- * ***************************************************************** -->
+        <!-- * * MAKE "DOM INTERFACE" SECTION -->
+        <!-- * ***************************************************************** -->
+        <xsl:call-template name="make.dom-interface.section">
+          <xsl:with-param name="name" select="$name"/>
+        </xsl:call-template>
+        <!-- * ***************************************************************** -->
         <!-- * * MAKE "TYPICAL DEFAULT DISPLAY PROPERTIES" SECTION -->
         <!-- * ***************************************************************** -->
         <xsl:variable name="name-colon" select="concat($name,':')"/>
@@ -1337,9 +1349,6 @@
             </div>
           </xsl:when>
         </xsl:choose>
-        <xsl:call-template name="make.details.section">
-          <xsl:with-param name="name" select="$name"/>
-        </xsl:call-template>
         <!-- * ***************************************************************** -->
         <!-- * * MAKE EXAMPLES SECTION -->
         <!-- * ***************************************************************** -->
@@ -1689,6 +1698,50 @@
   </xsl:template>
 
   <!-- * ***************************************************************** -->
+  <!-- * * MAKE THE "DOM INTERFACE" SECTION -->
+  <!-- * ***************************************************************** -->
+  <xsl:template name="make.dom-interface.section">
+    <xsl:param name="name"/>
+    <xsl:variable name="spec-url">http://dev.w3.org/html5/spec/</xsl:variable>
+    <div class="no-number no-toc" id="{$name}-interface">
+      <xsl:text>&#10;        </xsl:text>
+      <h2 class="element-subhead">DOM interface</h2>
+      <xsl:choose>
+        <xsl:when test="document(concat('../elements/',$name,'.html'))//h:div[@id='dom-interface']">
+          <xsl:variable name="interface" select="document(concat('../elements/',$name,'.html'))//h:div[@id='dom-interface']"/>
+          <xsl:choose>
+            <xsl:when test="document('../webapps.html')//*[@class='idl'][dfn=$interface]">
+              <pre class="idl">
+                <xsl:for-each select="document('../webapps.html')//*[@class='idl'][dfn=$interface]/node()">
+                  <xsl:choose>
+                    <xsl:when test="self::dfn">
+                      <b><xsl:value-of select="."/></b>
+                    </xsl:when>
+                    <xsl:when test="self::a">
+                      <a href="{$spec-url}{@href}" title="{@title}"><xsl:value-of select="."/></a>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:copy-of select="."/>
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </xsl:for-each>
+              </pre>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message>ERROR: interface <xsl:value-of select="$interface"/> not found</xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <p class="dom-interface">Uses
+            <a href="{$spec-url}#HTMLElement" title="HTMLElement">HTMLElement</a>.
+          </p>
+        </xsl:otherwise>
+      </xsl:choose>
+    </div>
+  </xsl:template>
+
+  <!-- * ***************************************************************** -->
   <!-- * * MAKE THE "DETAILS" SECTION -->
   <!-- * ***************************************************************** -->
   <xsl:template name="make.details.section">
Received on Wednesday, 10 February 2010 12:49:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 February 2010 12:49:14 GMT