]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure entityref gets expanded when stripping (there are no entity declarations...
authorNorman Walsh <ndw@nwalsh.com>
Fri, 21 Apr 2006 20:07:34 +0000 (20:07 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 21 Apr 2006 20:07:34 +0000 (20:07 +0000)
xsl/common/stripns.xsl

index 514c7844bd2fee895a0d697aa2127210e104cb0b..0fac76927ec3864ca64c7eeb8bff488cebb2ad91 100644 (file)
                     |ng:audiodata|db:audiodata" mode="stripNS">
   <xsl:element name="{local-name(.)}">
     <xsl:copy-of select="@*[not(name(.) = 'xml:id')
-                        and not(name(.) = 'version')]"/>
+                           and not(name(.) = 'version')
+                           and not(name(.) = 'entityref')]"/>
     <xsl:if test="@xml:id">
       <xsl:attribute name="id">
        <xsl:value-of select="@xml:id"/>
       </xsl:attribute>
     </xsl:if>
 
+    <xsl:choose>
+      <xsl:when test="@entityref">
+       <xsl:attribute name="fileref">
+         <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+       </xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+
     <xsl:apply-templates mode="stripNS"/>
   </xsl:element>
 </xsl:template>