Sha256: eea63aa76be6f4f469965874c881f475b840611018bcca1d3a650f14aab96c83

Contents?: true

Size: 1.45 KB

Versions: 111

Compression:

Stored size: 1.45 KB

Contents

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" encoding="UTF-8"/>
  <xsl:param name="indent-increment" select="'   '"/>

  <xsl:template name="newline">
    <xsl:text disable-output-escaping="yes">
</xsl:text>
  </xsl:template>

  <xsl:template match="comment() | processing-instruction()">
    <xsl:param name="indent" select="''"/>
    <xsl:call-template name="newline"/>
    <xsl:value-of select="$indent"/>
    <xsl:copy />
  </xsl:template>

  <xsl:template match="text()">
    <xsl:param name="indent" select="''"/>
    <xsl:call-template name="newline"/>
    <xsl:value-of select="$indent"/>
    <xsl:value-of select="normalize-space(.)"/>
  </xsl:template>

  <xsl:template match="text()[normalize-space(.)='']"/>

  <xsl:template match="*">
    <xsl:param name="indent" select="''"/>
    <xsl:call-template name="newline"/>
    <xsl:value-of select="$indent"/>
      <xsl:choose>
       <xsl:when test="count(child::*) > 0">
        <xsl:copy>
         <xsl:copy-of select="@*"/>
         <xsl:apply-templates select="*|text()">
           <xsl:with-param name="indent" select="concat ($indent, $indent-increment)"/>
         </xsl:apply-templates>
         <xsl:call-template name="newline"/>
         <xsl:value-of select="$indent"/>
        </xsl:copy>
       </xsl:when>
       <xsl:otherwise>
        <xsl:copy-of select="."/>
       </xsl:otherwise>
     </xsl:choose>
  </xsl:template>
</xsl:stylesheet>

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
dor-services-9.6.2 lib/dor/datastreams/human.xslt
dor-services-9.6.1 lib/dor/datastreams/human.xslt
dor-services-9.6.0 lib/dor/datastreams/human.xslt
dor-services-9.5.0 lib/dor/datastreams/human.xslt
dor-services-9.4.0 lib/dor/datastreams/human.xslt
dor-services-9.3.0 lib/dor/datastreams/human.xslt
dor-services-9.2.1 lib/dor/datastreams/human.xslt
dor-services-9.2.0 lib/dor/datastreams/human.xslt
dor-services-9.1.0 lib/dor/datastreams/human.xslt
dor-services-9.0.0 lib/dor/datastreams/human.xslt
dor-services-8.6.0 lib/dor/datastreams/human.xslt
dor-services-8.5.0 lib/dor/datastreams/human.xslt
dor-services-8.4.0 lib/dor/datastreams/human.xslt
dor-services-8.3.0 lib/dor/datastreams/human.xslt
dor-services-8.2.0 lib/dor/datastreams/human.xslt
dor-services-8.1.1 lib/dor/datastreams/human.xslt
dor-services-8.1.0 lib/dor/datastreams/human.xslt
dor-services-8.0.0 lib/dor/datastreams/human.xslt
dor-services-7.2.4 lib/dor/datastreams/human.xslt
dor-services-7.2.3 lib/dor/datastreams/human.xslt