473,588 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLTransform class cannot handle QNames

I have an XSL transform that tries to set the schema definition of the root
attribute as follows:

<xsl:template match="CR">
<xsl:element name="CR">
<xsl:attribut e
name="xmlns:xsi "><xsl:text>htt p://www.w3.org/2001/XMLSchema-instance</xsl:te
xt></xsl:attribute>
<xsl:attribut e
name="xsi:noNam espaceSchemaLoc ation"><xsl:tex t>CR.xsd</xsl:text></xsl:attrib
ute>
....

This works fine with the Xalan processor, but generates an error using the
..NET XslTransform class. I think this is a discretionary behavior of
Microsoft's XSL engine as described in
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconimplementa tionofdiscretio narybehaviorsin xsltransformcla ss.asp :

Problem: The name attribute in xsl:attribute and xsl:element generated from
an attribute value template is not a valid QName.

Behavior: Exception thrown
Can anyone recommend a work-around? Is there a simple way to handle the
exception for just these attributes?

Thx,

Tim
Nov 13 '05 #1
0 1029

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

Similar topics

0
1227
by: Tim Meagher | last post by:
I have an XSL transform that tries to set the schema definition of the root attribute as follows: <xsl:template match="CR"> <xsl:element name="CR"> <xsl:attribute name="xmlns:xsi"><xsl:text>http://www.w3.org/2001/XMLSchema-instance</xsl:te xt></xsl:attribute> <xsl:attribute name="xsi:noNamespaceSchemaLocation"><xsl:text>CR.xsd</xsl:text></xsl:attrib
2
5814
by: Anthony Bouch | last post by:
Can anyone tell me why I receive the following compiler warning after having recently upgraded to VS.Net 2003 and .Net 1.1? Warning CS0618: 'System.Xml.Xsl(System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.Xml.XmlWriter)' is obsolete: 'You should pass XmlResolver to Transform() method' XPathDocument xmlData = new XPathDocument(memStream); XslTransform xslTransform = new XslTransform();...
1
1873
by: Rodger McNab | last post by:
While parsing xpath expressions within an XSLT document the .NET XslTransform class seems to delete the first "/" after a "]" within an expression containing a "|". This problem can be demonstrated by the following short C# program. The program throws an exception saying that "ac" is an invalid XPath expression. using System; using System.Xml; using System.Xml.XPath; using System.Xml.Xsl;
7
4528
by: Steven Reddie | last post by:
My problem starts with wanting " " to actually appear that way in the output rather than an actual encoded 0xA0 byte in the output stream. I thought a way to solve this would be to select us-ascii or iso-8859-1 as the output encoding, and so used this line in the stylesheet: <xsl:output method="html" encoding="iso-8859-1"/> The XslTransform documentation states something like (I can't locate it now) that the encoding is ignored...
2
6022
by: Graham Pengelly | last post by:
Hi I am trying to transform on System.Xml.XmlDocument into another using XslTransform without writing the object out to a file. I am guessing it should work something like this... public XmlDocument TransformXmlDoc(XmlDocument docToTransform, string xsltFilePath) { //load the xslt
3
2261
by: Steve | last post by:
Is there any way of specifying the startMode when using the xslTransform class? We are updating code which used msxml to the system.xml classes but can find no way to specify the startMode. We use this so that we can specify different templates to be used by the same xml node. Know that we could use global params, but would rather not have to update all teh stylesheets and any code that uses msxml and the same stylesheets.
1
2783
by: manlio | last post by:
how can I load a XSL string (not an xsl file!!) with XslTransform ??? If I use the code: // Create a new XslTransform class and load the stylesheet XslTransform myXslTransform = new XslTransform(); myXslTransform.Load("myFile.xsl"); it run, but I need load an XSL string:
1
1502
by: rmgalante | last post by:
Hello, I have a VB.Net component that uses the XslTransform object. I am using the FXSL randomizeList function in my XSL template. When I transform the XML in the VB.Net component, my application hangs. When I load the XML in a browser with a reference to the XSL template, it works fine. Here is my XML:
12
10083
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b) ..... // xsl contents abc.aspx?p1=v1&amp;p2=<xsl:value-of select="$v2" />
9
2494
by: WT | last post by:
Hello, I have code created with .net 1.0 and migrated to 3.5. Form 2.0 the XslTransform class is obsolete and the vs2008 compiler generates warnings that these classes are absolete suggesting to use XslCompiledTransform. But all this was rendered using an Xml control and I can't find a way to relate this control to an XslCompiledTransform ? Any help appreciated to solve this migration pb.
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7984
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
6634
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
5726
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
5398
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
3847
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...
1
1458
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.