[xsl] unwanted xmlns and shape attributes

Subject: [xsl] unwanted xmlns and shape attributes
From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx>
Date: Fri, 9 Sep 2005 15:35:46 +0200
Hi list,
I have two temporary trees to be used for an identity
transformation. The first one $html is initialized with
<xsl:copy-of select="doc('itrans.html')"/>
the second one with a sequence constructor. The
transformation inserts an anchor element before the
one existing already. It finally works somehow, but I've
still two problems (using Saxon 8.5.1):
a. The inserted anchor shows xmlns="" as an attribute,
   but how do I to get rid of it?
      I know that specifying a default nemespace
   on the stylesheet would solve the issue. However
   this seems to have a devastating effect on my
   original stylesheet and I would like to avoid it.
b. The second anchor shows a shape="rect" attribute,
   which is not in the source and again the question
   is how do I to get rid of it?

Regards, Manfred

Input file itrans.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml";>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<div class="index">
			<a href="Index.html">Personen-Index</a>

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
<xsl:output method="xhtml"
   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
   omit-xml-declaration="yes" />
<xsl:template match="node()|@*" mode="index">
<xsl:param name="a"/>
	<xsl:copy copy-namespaces="no">
     	<xsl:apply-templates select="node()|@*" mode="index">
			<xsl:with-param name="a" select="$a"/>
<xsl:template xpath-default-namespace="http://www.w3.org/1999/xhtml";
match="a" mode="index">
<xsl:param name="a"/>
	<xsl:copy-of select="$a" copy-namespaces="no"/>
	<xsl:copy-of select="."/>

<xsl:template match="/">
	<xsl:variable name="html">
		<xsl:copy-of select="doc('itrans.html')"/>
	<xsl:variable name="link">
		<a href="../name.html">
	<xsl:apply-templates select="$html" mode="index">
		<xsl:with-param name="a" select="$link"/>

Current Thread