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

html5/markup/tools refgen.xsl,NONE,1.1

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 28 Jan 2010 16:22:49 +0000
To: public-html-commits@w3.org
Message-Id: <E1NaX8r-0008PF-KN@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv32279/tools

Added Files:
	refgen.xsl 
Log Message:
tools/refgen.xsl

--- NEW FILE: refgen.xsl ---
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
                xmlns:h='http://www.w3.org/1999/xhtml'
                xmlns='http://www.w3.org/1999/xhtml'
                xmlns:date="http://exslt.org/dates-and-times"
                exclude-result-prefixes='h date'
                version='1.0' id='xslt'>
  <xsl:output method='xml' encoding='us-ascii'
    doctype-public='-//W3C//DTD HTML 4.01//EN'
    doctype-system='http://www.w3.org/TR/html4/strict.dtd'
    media-type='text/html; charset=us-ascii'
    indent="yes"/>
  <xsl:template match="/">
    <html>
      <xsl:text>&#10;</xsl:text>
      <head>
        <xsl:text>&#10;</xsl:text>
        <title>HTML element reference</title>
        <xsl:text>&#10;</xsl:text>
      </head>
      <xsl:text>&#10;</xsl:text>
      <body>
        <xsl:for-each select="//h:section[child::h:h2[@class='element-head']]">
          <xsl:text>&#10;</xsl:text>
          <h4 id="the-{@id}-element">The <xsl:value-of select="@id"/> element</h4>
          <xsl:text>&#10;</xsl:text>
          <dl class="element">
            <xsl:text>&#10;</xsl:text>
            <dt>Contexts in which this element may be used:</dt>
            <xsl:text>&#10;</xsl:text>
            <xsl:for-each select="descendant::h:li[@class='context-mdl']">
              <dd><xsl:copy-of select="node()"/></dd>
            </xsl:for-each>
            <xsl:text>&#10;</xsl:text>
            <dt>Content model:</dt>
            <xsl:text>&#10;</xsl:text>
            <xsl:for-each select="descendant::h:dt[@class='content-model']">
              <dd><xsl:copy-of select="node()"/><xsl:copy-of select="following-sibling::h:dd/node()"/></dd>
              <xsl:text>&#10;</xsl:text>
            </xsl:for-each>
            <xsl:for-each select="descendant::h:p[@class='elem-mdl']">
              <dd><xsl:copy-of select="node()"/></dd>
              <xsl:text>&#10;</xsl:text>
            </xsl:for-each>
          </dl>
          <xsl:text>&#10;</xsl:text>
        </xsl:for-each>
        <xsl:text>&#10;</xsl:text>
      </body>
      <xsl:text>&#10;</xsl:text>
    </html>
  </xsl:template>
</xsl:stylesheet>
Received on Thursday, 28 January 2010 16:22:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 28 January 2010 16:22:55 GMT