html5/spec-author-view/tools postprocess-complete.xsl,NONE,1.1 postprocess.xsl,NONE,1.1 flag-frags-complete.xsl,1.2,NONE flag-frags.xsl,1.2,NONE

Update of /sources/public/html5/spec-author-view/tools
In directory hutz:/tmp/cvs-serv30686/tools

Added Files:
	postprocess-complete.xsl postprocess.xsl 
Removed Files:
	flag-frags-complete.xsl flag-frags.xsl 
Log Message:
variety of changes to make it clear to users this is the author subset and not the full spec


--- NEW FILE: postprocess-complete.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" version="1.0">
  <xsl:output method="html" indent="no"/>
  <xsl:key name="local-frags" match="." use="concat('#',@id)"/>
  <xsl:key name="filename-map" match="." use="h:li"/>
  <xsl:template match="node() | @*">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="h1">
    <h1>HTML5 (Edition for Web Authors)</h1>
  </xsl:template>
  <xsl:template match="title">
    <title>HTML5 (Edition for Web Authors)</title>
  </xsl:template>
  <xsl:template match="a[normalize-space(.)='http://www.w3.org/TR/html5/']">
    <a href="http://www.w3.org/TR/html5/author/">http://www.w3.org/TR/html5/author/</a>
  </xsl:template>
[...12581 lines suppressed...]
<li>tokenization</li>
</ul>
<ul>
<li>#attr-marquee-behavior-alternate</li>
<li>obsolete</li>
</ul>
<ul>
<li>#the-optgroup-element</li>
<li>the-button-element</li>
</ul>
<ul>
<li>#submit-button-state</li>
<li>number-state</li>
</ul>
<ul>
<li>#concept-select-option-list</li>
<li>the-button-element</li>
</ul>
</div>
</xsl:stylesheet>

--- NEW FILE: postprocess.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:h="http://www.w3.org/1999/xhtml"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  version='1.0'>
  <xsl:output method="html" indent="no"/>
  <xsl:key name="local-frags" match="." use="concat('#',@id)"/>
  <xsl:key name="filename-map" match="." use="h:li"/>
  <xsl:template match="node() | @*">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="h1">
    <h1>HTML5 (Edition for Web Authors)</h1>
  </xsl:template>
  <xsl:template match="title">
    <title>HTML5 (Edition for Web Authors)</title>
  </xsl:template>
  <xsl:template match="a[normalize-space(.)='http://www.w3.org/TR/html5/']">
    <a href="http://www.w3.org/TR/html5/author/">http://www.w3.org/TR/html5/author/</a>
  </xsl:template>
  <xsl:template match="a[normalize-space(.)='http://dev.w3.org/html5/spec/Overview.html']">
    <a
      href="http://dev.w3.org/html5/spec-author-view/">http://dev.w3.org/html5/spec-author-view/</a>
  </xsl:template>
  <xsl:template match="a[starts-with(normalize-space(.),'http://www.w3.org/TR/2010/WD-html5-201')]
    [not(normalize-space(.)='http://www.w3.org/TR/2010/WD-html5-20100304/')]
    ">
    <xsl:variable name="href">
      <xsl:value-of select="concat(.,'author/')"/>
    </xsl:variable>
    <a href="{$href}"><xsl:value-of select="$href"/></a>
  </xsl:template>
  <xsl:template match="p[contains(normalize-space(.),'This specification is available in the following formats')]">
    <xsl:copy-of select="@*"/>
    <xsl:for-each select="node()">
      <xsl:choose>
        <xsl:when test="normalize-space(.) = 'single page HTML'">
          <a href="spec.html">single page HTML</a>
        </xsl:when>
        <xsl:when test="normalize-space(.) = 'multipage HTML'">
          <a href="Overview.html">multipage HTML</a>
        </xsl:when>
        <xsl:when test="normalize-space(.) = 'author edition'">
          <a href="http://dev.w3.org/html5/spec/">full specification</a>
        </xsl:when>
        <xsl:when test="starts-with(normalize-space(.),'. This is revision $Revision: ')">
          <xsl:text>. This is revision </xsl:text>
          <xsl:value-of select="concat(substring-before(substring-after(normalize-space(.),'. This is revision $Revision: 1.1 $.'),'.')"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:copy>
            <xsl:apply-templates/>
          </xsl:copy>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:for-each>
  </xsl:template>
  <xsl:template match="h2[@id='abstract']">
    <xsl:copy-of select="."/>
    <xsl:text>&#10;</xsl:text>
    <p class="strong-note">This is a strict subset of the
      <a href="http://dev.w3.org/html5/spec/">HTML5 specification</a>
      that omits user-agent (UA) implementation details. It is
      targeted toward Web authors and others who are not UA
      implementors and who want a view of the HTML specification
      that focuses more precisely on details relevant to using the
      HTML language to create Web documents and Web applications.
      Because this document does not provide implementation
      conformance criteria, UA implementors should not rely on it,
      but should instead refer to the full specification.</p>
  </xsl:template>
  <xsl:template match="a[@href[starts-with(.,'#')]]">
    <xsl:variable name="ref" select="@href"/>
    <xsl:choose>
      <xsl:when test="not(key('local-frags',$ref))">
        <xsl:message>
          <xsl:value-of select="$ref"/>
        </xsl:message>
        <xsl:variable name="filename">
          <xsl:call-template name="get-filename">
            <xsl:with-param name="ref" select="$ref"/>
          </xsl:call-template>
        </xsl:variable>
        <a>
          <xsl:copy-of select="@*"/>
          <xsl:attribute name="href">
            <xsl:value-of select="concat('http://dev.w3.org/html5/spec/',$filename,'.html',$ref)"/>
          </xsl:attribute>
          <xsl:attribute name="class">full-spec-link</xsl:attribute>
          <xsl:attribute name="title">
            <xsl:text>Read about this "</xsl:text>
            <xsl:value-of select="normalize-space(.)"/>
            <xsl:text>" reference in the full HTML5 spec.</xsl:text>
          </xsl:attribute>
          <xsl:apply-templates/>
        </a>
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy-of select="."/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <xsl:template name="get-filename">
    <xsl:param name="ref"/>
    <xsl:for-each select="document('')">
      <xsl:value-of select="key('filename-map',$ref)/*[2]"/>
    </xsl:for-each>
  </xsl:template>
  <xi:include href="../fragment-links.xhtml"/>
</xsl:stylesheet>

--- flag-frags-complete.xsl DELETED ---

--- flag-frags.xsl DELETED ---

Received on Thursday, 8 July 2010 07:46:12 UTC