Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Error: Cannot construct namespace declaration ...

From: SlavaSedov@-----------.---------.---
To: NULL
Date: 8/3/2005 6:06:00 AM
it too complex code to make this reducing in short time

i denied to use any xml in project in default ns equals to ''
and just precede "with namespaces (default 'myns',  
'http://www.w3.org/1999/xhtml' as "xhtml")" all sql statements that produces 
xml - it little more complex but much more manageable, but error still 
reproduced (or same error or if remove defaultns='...' then still have 
<xhtml:h1 xmlns="">...</xhtml:h1> in output)

"Martin Honnen" wrote:

> 
> 
> Slava Sedov wrote:
> 
> 
> > Server Error in '/publ2005' Application.
> 
> So you are using ASP.NET, is that right?
> 
> > Cannot construct namespace declaration 
> > xmlns:='http://www.w3.org/1999/xhtml'. Prefix '' is already mapped to 
> > namespace ''.
> > Description: An unhandled exception occurred during the execution of the 
> > current web request. Please review the stack trace for more information about 
> > the error and where it originated in the code.
> > 
> > Exception Details: System.Xml.Xsl.XslTransformException: Cannot construct 
> > namespace declaration xmlns:='http://www.w3.org/1999/xhtml'. Prefix '' is 
> > already mapped to namespace ''.
> > 
> > Source Error:
> > 
> > Line 260:        };
> > Line 261:
> > Line 262:        xsltransform.Transform(xml, xsltargs, writer);
> > Line 263:    }
> > Line 264:    public static void WriteXML(XmlDocument xml)
> > 
> > 
> > Source File: c:\Inetpub\wwwroot\publ2005\mypage.cs    Line: 262
> 
> > Version Information: Microsoft .NET Framework Version:2.0.50215.312; ASP.NET 
> > Version:2.0.50215.312
> 
> ASP.NET 2.0 even.
> 
> It is not possible for me to see from the stack trace what you are 
> actually doing in the ASP.NET page, the line above obviously suggests 
> that you are calling XslTransform.Transform with some XmlDocument, some 
> args and some writer.
> 
> Can you try to reduce the code and post a minimal example of the .NET 
> code, the XML input and the XSLT stylesheet creating the error?
> 
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent