Re: [xsl] Schema declarations showing up in my html

Subject: Re: [xsl] Schema declarations showing up in my html
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 2 Apr 2005 00:26:05 +0100
> I realize this may be more of a .net question, but u guys are so much
> better than those other forums.

I suspect that it's just an xslt question, but it's hard to be sure as
you only posted your .net code which I don't think is relevant.


  <element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>elementvalue</element>

  every single time I do a <xsl:copy-of select="element" in my xsl

when you do copy-of you copy a node and it gets copied along with all
its namespaces children attributes etc, so presumably the xsi namespace
was in scope on the element that you copied. If this namespace is not on
any ancestor node in the result, copying the namespace node for this
element will cause a namespace declaration to be output.

if you wouldn't mind just getting one xmlns:xsi at the top level just
make sure that your top level result element uses this namespace.

If you don't want this namespace at all, then you either need to make
sure it is not in your source, or make sure you don't copy it
for example replace
<xsl:copy-of select="element"/>
by
<xsl:element name="element">
 <xsl:copy-of select="@*"/>
</xsl:element>

If the xsi namespace isn't in your source, then my guess is wrong and
you can ignore all the above.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread