This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How do I suppress a namespace declaration for "xml:" using Saxon?


I am using saxon to convert a bunch of files that used the attribute
"xml-lang" instead of "xml:lang" (this was because of a historical bug in
XMetal, I am told).

To make a long story short, I have a template in my transform like this:

<xsl:template match="@xml-lang">
  <xsl:attribute name="xml:lang">
    <xsl:value-of select="."/>
  </xsl:attribute>
</xsl:template>

This works, except I get declaration like this on the output element:

<thingy xmlns:xml="xml" xml:lang="en">. . .etc.

I know that namespace prefixes xml (and case variations) are reserved.  The
declaration above is unnecessary.  Is it harmful?  How would I suppress it?

Thanks.  And everyone please say a prayer for me, as I seem to be stuck
permanently at the beginner level, even after a year of using xslt.
Probably it was all that beer I drank as an undergraduate.

- Dave -





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]