<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
  SPARQL Extensions to core spec XSL stuff
 -->


<!-- HTML tags that we want to pass through unchanged -->
  <xsl:template match="acronym|strong|dl|dt|dd|b|blockquote|tt|i|br|form|input|script|span">
    <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>

  <xsl:template match="span[@class='hide']" />

  <xsl:template match="codeeg">
    <div xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre; font-family: monospace;">
        <xsl:apply-templates/>
    </div>
  </xsl:template>

  <xsl:template match="authlist">
    <dt xmlns="http://www.w3.org/1999/xhtml">
      <xsl:text>Editor</xsl:text>
      <xsl:if test="count(author[@role='Editor']) &gt; 1">
        <xsl:text>s</xsl:text>
      </xsl:if>
      <xsl:text>:</xsl:text>
    </dt>
    <xsl:apply-templates select="author[@role='Editor']"/>

    <xsl:if test="author[@role='PreviousEditor']">
        <dt xmlns="http://www.w3.org/1999/xhtml">
          <xsl:text>Previous Editor</xsl:text>
          <xsl:if test="count(author[@role='PreviousEditor']) &gt; 1">
            <xsl:text>s</xsl:text>
          </xsl:if>
          <xsl:text>:</xsl:text>
        </dt>
        <xsl:apply-templates select="author[@role='PreviousEditor']"/>
    </xsl:if>

   <xsl:if test="author[@role='Contributor']">
        <dt xmlns="http://www.w3.org/1999/xhtml">
          <xsl:text>Contributor</xsl:text>
          <xsl:if test="count(author[@role='Contributor']) &gt; 1">
            <xsl:text>s</xsl:text>
          </xsl:if>
          <xsl:text>:</xsl:text>
        </dt>
        <xsl:apply-templates select="author[@role='Contributor']"/>
    </xsl:if>

  </xsl:template>

  

</xsl:stylesheet>
