473,511 Members | 10,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help: 'xsl' is an undeclared namespace

Hi

The Transform engine seams to fool me, first it says:
'xsl' is an undeclared namespace.

but if i change it to
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

this error message appears:
The wrong namespace was used for XSL. Use
'http://www.w3.org/1999/XSL/Transform'
Which I actually do!

This is my XSL File:
====
<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0"
encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<html>
<body>Test</body>
</html>
</xsl:template>
</stylesheet>
===

This is the way i transform it:
====
XmlDocument doc = new XmlDocument();
doc.Load("C:\\index.xml");

XslTransform xslT = new XslTransform();
xslT.Load("C:\\Standard.xslt");
XsltArgumentList args = new XsltArgumentList();
xslT.Transform(doc, args, Response.OutputStream);
====

Whats wrong?

best regards,
dominik
Nov 11 '05 #1
2 5369

"Dominik Amon" <do***************@linuxmail.org> wrote in message
news:eg*************@TK2MSFTNGP11.phx.gbl...
Hi

The Transform engine seams to fool me, first it says:
'xsl' is an undeclared namespace.

but if i change it to
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
this error message appears:
The wrong namespace was used for XSL. Use
'http://www.w3.org/1999/XSL/Transform'
Which I actually do!

This is my XSL File:
====
<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Must be: xsl:stylesheet
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Nov 11 '05 #2
Hi Dominik,

Dimitre Novatchev has answered your question. I agree that the error
message is confusing, it is already fixed in our currents bits and read as
follows:

---> System.Xml.Xsl.XsltException: Stylesheet must start either with
'xsl:stylesheet' or 'xsl:transform' element, or with a literal result
element having 'xsl:version' attribute.

Thanks for your feedback!

Anton Lapounov
System.Xml Dev

-----
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 11 '05 #3

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

Similar topics

1
2266
by: CB | last post by:
I have a group of documents that previously had no schema, now I have a schema, and I want to use XSLT to fixup the documents by inserting the namespace reference. In other words, my input...
1
1888
by: Lothar Lemnitzer | last post by:
Dear fellows, I have a problem with matching namespaces in an XML document and an XSLT stylesheet (at least I think that this is the source of trouble). My XML document looks like this: 1...
11
1897
by: Rolf Barbakken | last post by:
I have an xml with records like this one: <a:response> <a:href>http://server/public/sol/comp/1049306.eml</a:href> <a:propstat> <a:status>HTTP/1.1 200 OK</a:status> <a:prop>...
4
1356
by: n.phelge | last post by:
I'm trying to validate XML which doesn't include a namespace, so I've written a schema and I'm attempting to add a namespace to the original XML using XSLT. The original XML looks like this: ...
16
1563
by: hoggmeister | last post by:
Hi, Im new to C coming from a java background. I having difficulty adjusting to C and was hoping someone could help me with a little simple code to get started. I would like a little program...
1
1674
by: daldridge | last post by:
I have a unique-elements/sorting question (who doesn't?), but haven't yet been able to get appropriate template/select/for-each processing working. I don't fully grok the Muenchian technique yet...
2
1449
by: shapper | last post by:
Hello, I created a XSL file to convert a XML file to another XML. I am running this in Asp.Net but this is not working. ----- ORIGINAL XML ----- <?xml version="1.0" encoding="utf-8" ?>...
4
3111
by: n.phelge | last post by:
I need to perform an XSLT to set the namespace on some XML and I need to preserve the original document line formatting to assist with error handling (so the line number from any schema validation...
1
1249
by: luthriaajay | last post by:
Using <xsl:value-of in XSL XML file <i:Details> <i:Stra> <stra:Desc>ABC</stra.Desc>
0
7251
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,...
0
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5673
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,...
1
5072
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...
0
4743
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...
0
3230
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...
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
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...

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.