473,804 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XslCompiledTran sform adds xmlns:msxsl attribute to root node

Hi all,

I use XslCompiledTran form to transform one XML file into another. In my
stylesheet I use the msxsl:node-set() function, so I have a namespace import
in my stylesheet.

After transforming, the root node of my resulting XML file has an attribute

xmlns:msxsl="ur n:schemas-microsoft-com:xslt"

Since the resulting XML file is being validated, this unexpected attribute
generates an exception.

Does anyone know how to prevent this attribute from being generated?

Thanks!

Joost van den Boom

Mar 1 '07 #1
1 3419
Joost van den Boom wrote:
Does anyone know how to prevent this attribute from being generated?
<xsl:styleshe et
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="ur n:schemas-microsoft-com:xslt"
version="1.0"
exclude-result-prefixes="msxsl ">

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5683
by: Hyunchan Kim | last post by:
To indent xml file, I made an instance of Transformer from Templates using following. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt" version="1.0"> <xsl:output method="xml" indent="yes" xalan:indent-amount="4"/> <xsl:template match="/">
4
3596
by: David S. Alexander | last post by:
I am trying to transform XML to XML using an XSLT in C#, but the root node of my XML is not being matched by the XSLT if it has an xmlns attribute. Am I handling my namespaces incorrectly? My C# code is, // Create an XSLT transform object XslTransform xslTransform = new XslTransform(); // Load the stylesheet
0
2028
by: Ewan Fairweather | last post by:
Hi, I'm generating the below XML in c# for an asp.net application When i've generated this XML the <LaboratoryDetails xmlns=""> element has a blank xmlns set. How do i either a) remove this attribute or b) prevent it from happening in the first place. To generate the xml I've got two template files which i've included at the bottom of this post. Two xmldocuments are created in my code which load the
1
2998
by: Ewan Fairweather | last post by:
Hi, I'm generating the below XML in c# for an asp.net application When i've generated this XML the <LaboratoryDetails xmlns=""> element has a blank xmlns set. How do i either a) remove this attribute or b) prevent it from happening in the first place. To generate the xml I've got two template files which i've included at the bottom of this post. Two xmldocuments are created in my code which load the
6
24516
by: fzhang | last post by:
I am relatively new to XML and C#. So, forgive me if this question is too newbie. :-) While assuming this is an easy programming task, I couldn't find a single reference anywhere for how to do it. Here is the situation: I am given an XML file like the one below from other group in my company to load the data into our database. <root xmlns="the-namespace">
0
987
by: Ik | last post by:
Hi all, I use XslCompiledTranform to transform one XML file into another. In my stylesheet I use the msxsl:node-set() function, so I have a namespace import in my stylesheet. After transforming, the root node of my resulting XML file has an attribute xmlns:msxsl="urn:schemas-microsoft-com:xslt"
3
3906
by: =?Utf-8?B?R3JlZw==?= | last post by:
If I have an XmlDocument with a deep hierarchy of nodes, with a documentElement having an attribute xmlns="http://someurl.com" and all children inheriting that namespace (but not having the xmlns attribute explicitly declared), then why is it that when I perform appendChild(someNode) on an existing node deep in the hierarchy, where someNode has been created by an XmlSerializer with the namespace set to be the aforementioned...
4
7732
by: =?Utf-8?B?UmFqaXY=?= | last post by:
Hi, I have a webservices(developed in .net 2.0, using c#) with a webmethod that returns a XML document. The problem is that the XML returned from the webservice is having a attribute xmlns="" in the root node. It seems that ..net framework is adding this attribute as I have not adding this attribute through my code. Is it possible to remove this attribut from the response XML? I know can be possible to remove it at the client side,...
1
3835
by: C.W.Holeman II | last post by:
I have an xmlns attribute that produces an XHTML validation error and I do not understand why it is considered an error.The file displays as expected on Firefox and IE7. http://emle.sourceforge.net/emle020100/lab/ng20070625_emle_lab_001-e.xml.html <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
1
5504
by: Amit | last post by:
Suppose I am having this input xml:<Event><Test></Test><Result Value="true"><Request xmlns='http://tempuri.org/AtoB.xsd' RequestID="" MessageID="" UniqueID="000172581"/><Application></Application></ Result></Event> and I want this xml output:<Event><Test></Test><Request xmlns='http:// tempuri.org/AtoB.xsd' RequestID="" MessageID="" UniqueID="000172581"/ i.e removing of <Resulttag in the output xml string & For this I wrote an xslt but I...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.