[xsl] stop the processing of default attributes?

Subject: [xsl] stop the processing of default attributes?
From: dvint@xxxxxxxxx
Date: Thu, 18 Aug 2011 15:22:20 -0700
I think I know the answer to this question, but would like to see if I
mssied something.

I;m using the following template in my conversion effort. This si teh
default handling for any element that I don't have something specific to
do on it:

<xsl:template match="*">
	<xsl:element  name="{name()}">
		<xsl:for-each select="@*">
			<xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
		</xsl:for-each>

		<xsl:apply-templates/>
	</xsl:element>
</xsl:template>

This works great except for places where the element has some default
value in the schema. So instead of getting <refdm> as output, I get:

<refdm show="replace" type="simple" actuate="onRequest">

The attributes come from the xlink schema and don't appear in the source
file. Not sure if this is really a problem, but I would like to get my
output to be as close the source as possible, just in case someone runs a
diff on the files and asks why.

As this is a conversion moving from SGML to XML, I have some options when
I introduce the link to the schema file. I'm thinking that removing that
link until after this step is going to be the easiest way to stop this.

..dan

Current Thread