xsl-list
[Top] [All Lists]

RE: how to remove xmlns attributes in html out put via copy-of

2004-12-10 08:41:51
The xmlns= markup is not an attribute, it is a namespace declaration.

It's there because you have written your result elements in namespace
xmlns="http://limpens.com/entry";. If you don't want the namespace
declaration, don't generate the result elements in this namespace. They are
probably in this namespace because that's the default namespace declared in
the stylesheet.

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Jan Limpens [mailto:jan(_dot_)limpens(_at_)gmail(_dot_)com] 
Sent: 10 December 2004 14:46
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] how to remove xmlns attributes in html out put 
via copy-of

hi,

in my xml I have xhtml markup such as this:

<Document xmlns="http://limpens.com/entry";>
<Para>The solution came in the form of <a
href="http://authors.aspalliance.com/PaulWilson/Articles/?id=1
4">Wilson's
Master pages</a>.</Para>
</Document>

my xslt tries to convert this to valid xml
      <xsl:template match="entry:Para">
              <p>
                      <xsl:copy-of select="node()" />
              </p>
      </xsl:template>

but produces xmlns attributes in the xhtml tags, such as...
<p>The solution came in the form of <a
href="http://authors.aspalliance.com/PaulWilson/Articles/?id=14";
xmlns="http://limpens.com/entry";>Wilson's Master pages</a>.</p>

wheather this is correct behaviour or not, I don't like the added
namespace in the anchor element too much, because it breaks my
otherwise valid xhtml.

I am using the .net (version 1.0) processor.
I tried to look it up in the archives and the faq, but didn't find
anything useful (whereas I am quite positive my question has already
been answered numeous times), so I hope nobody minds.

Thanks in advance!
-- 
Jan
http://www.limpens.com

Otakoo Saloon Cartoon - newest episode at 
http://limpens.com/oscredirect

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--