xhtml2xhtml5.xsl #1

  • //
  • guest/
  • paul_allen/
  • p4convert-rusty/
  • docs/
  • _build/
  • docbook-xsl-ns-1.78.1/
  • xhtml5/
  • xhtml2xhtml5.xsl
  • View
  • Commits
  • Open Download .zip Download (2 KB)
<xsl:stylesheet exclude-result-prefixes="d"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:d="http://docbook.org/ns/docbook"
xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
                version="1.0">

<xsl:output indent="no" method="xml"/>

<xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>

<xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
   </xsl:copy>
</xsl:template>

<xsl:template match="xsl:output">
  <xsl:comment>Same as xhtml but with doctypes removed from xsl:output </xsl:comment>
  <xsl:text>&#10;</xsl:text>
  <xsl:comment>and including from ../xhtml directory </xsl:comment>
  <xsl:text>&#10;</xsl:text>
  <xslo:output method="xml" encoding="UTF-8" indent="no"/>
</xsl:template>

<xsl:template match="xsl:include/@href">
  <xsl:choose>
    <xsl:when test="starts-with(., '../')">
      <xsl:copy-of select="."/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:attribute name="href">
        <xsl:value-of select="concat('../xhtml/', .)"/>
      </xsl:attribute>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="comment()
             [starts-with(string(.), 'This file was created automatically')]">
  <xsl:text>&#10;</xsl:text>
  <xsl:comment>This file was created automatically by xhtml2xhtml5.xsl from the xhtml stylesheet.</xsl:comment>
  <xsl:text>&#10;</xsl:text>
</xsl:template>

<xsl:template match="comment()
             [starts-with(string(.), 'from the HTML stylesheets')]"/>

<xsl:include href="../common/subtitles.xsl"/>
</xsl:stylesheet>

# Change User Description Committed
#1 12446 Paul Allen Branching using p4convert-rusty
//guest/perforce_software/p4convert/docs/_build/docbook-xsl-ns-1.78.1/xhtml5/xhtml2xhtml5.xsl
#1 10706 Paul Allen Add document '_build' files.