Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Namespace declaration from source document appears in target document.

Reply
Thread Tools

Namespace declaration from source document appears in target document.

 
 
Mads Orbesen Troest
Guest
Posts: n/a
 
      04-19-2004
Hi,

If I have an XSLT sheet transforming elemens from the "myns" namespace
into xhtml, the "myns" namespace is declared automatically in the
output xhtml, even if not used. I can't seem to figure out why and how
to get rid of it.

The top of my XSLT file:
<xsl:stylesheet
xmlnssl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:myns="http://myns.org"
>

<xslutput
method="xml"
version="1.0"
encoding="UTF-8"
indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"

doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
/>

The generated xhtml file is fine except I'd like to get rid of that
myns-declaration:
<html xmlns:myns="http://myns.org">

How do I do that?

Thanks in advance,
/\/\\ads Orbesen Troest

(This is a corrected repost of a now cancelled message.)
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      04-20-2004


Mads Orbesen Troest wrote:
> If I have an XSLT sheet transforming elemens from the "myns" namespace
> into xhtml, the "myns" namespace is declared automatically in the
> output xhtml, even if not used. I can't seem to figure out why and how
> to get rid of it.
>
> The top of my XSLT file:
> <xsl:stylesheet
> xmlnssl="http://www.w3.org/1999/XSL/Transform" version="1.0"
> xmlns:myns="http://myns.org"


Use
<xsl:stylesheet exclude-result-prefixes="myns"
xmlnssl="..."
xmlns:myns="..."
version="1.0">



--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
Mads Orbesen Troest
Guest
Posts: n/a
 
      04-20-2004
Martin Honnen wrote:

> Use
> <xsl:stylesheet exclude-result-prefixes="myns"


Ah, excellent, thanks a lot!

/\/\\ads Orbesen Troest
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Schema: unique constraint + target namespace tthunder@gmx.de XML 1 09-26-2008 11:44 AM
Problem in setting Target Node and Target Tree Property mohit ASP .Net 0 01-23-2008 05:41 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
How to create hyperlink that appears only if the target file is present? The Dana's HTML 5 02-05-2005 11:02 PM
How to create hyperlink that appears only if the target file is present? The Dana's Javascript 3 02-05-2005 01:42 AM



Advertisments