473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem adding xsl prefix to stylesheet

I'm pretty new to Xml and Xslt so bear with. I cant seem to add the xsl
prefix to my stylesheet and get it to work.
Error: The wrong namespace was used for XSL. Use
'http://www.w3.org/1999/XSL/Transform'.

Heres my stylesheet
--------------------

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</stylesheet>

Heres my XmlDoc
--------------------
<?xml version="1.0" encoding="utf-8"?>
<achievements xmlns="http://tempuri.org/Achievements.xsd">
<achievement>
<date>My Date</date>
<title>My Title</title>
<description>My Description</description>
</achievement>
</achievements>
I am using a System.Web.UI.WebControl.XML control to implement it.
-------------------------------------------------------------------------
<asp:Xml id="xmlAchievements" Runat="server"
DocumentSource="../../../Globals/XML/Achievements.xml"
TransformSource="../../../Globals/XML/Transforms/FloatingAchievements.xslt"
/>

If I remove the xsl prefix in the stylesheet declaration it works. But then
I'm not able to apply html tags in my templates.
In the book I am learning from it all the examples show the xsl prefix. Why
is this not working?
Thanks

Ron
Nov 11 '05 #1
3 2517
Ron Vecchi wrote:
Heres my stylesheet
--------------------

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</stylesheet>


Wrong. Should be either
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>

or

<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
</stylesheet>
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2
Many Mnay thanks
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
Ron Vecchi wrote:
Heres my stylesheet
--------------------

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> </stylesheet>
Wrong. Should be either
<xsl:stylesheet version="1.0"

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

or

<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
</stylesheet>
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #3
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>

Hope the helps,

Randy
http://www.kbcafe.com

"Ron Vecchi" <ve******@comcast.net> wrote in message news:<Or**************@tk2msftngp13.phx.gbl>...
I'm pretty new to Xml and Xslt so bear with. I cant seem to add the xsl
prefix to my stylesheet and get it to work.
Error: The wrong namespace was used for XSL. Use
'http://www.w3.org/1999/XSL/Transform'.

Heres my stylesheet
--------------------

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</stylesheet>

Heres my XmlDoc
--------------------
<?xml version="1.0" encoding="utf-8"?>
<achievements xmlns="http://tempuri.org/Achievements.xsd">
<achievement>
<date>My Date</date>
<title>My Title</title>
<description>My Description</description>
</achievement>
</achievements>
I am using a System.Web.UI.WebControl.XML control to implement it.
-------------------------------------------------------------------------
<asp:Xml id="xmlAchievements" Runat="server"
DocumentSource="../../../Globals/XML/Achievements.xml"
TransformSource="../../../Globals/XML/Transforms/FloatingAchievements.xslt"
/>

If I remove the xsl prefix in the stylesheet declaration it works. But then
I'm not able to apply html tags in my templates.
In the book I am learning from it all the examples show the xsl prefix. Why
is this not working?
Thanks

Ron

Nov 11 '05 #4

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

Similar topics

20
by: Bernd Fuhrmann | last post by:
Hi! I have some trouble with some simple stupid XSLT-stuff. My stylesheet: ------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"...
2
by: Wolfgang | last post by:
I'm applying a simple XSLT style sheet to an XML file. The style sheet is: http://piru.alexandria.ucsb.edu/~rnott/MetadataMapping/access-report.xsl The XML file is here: ...
3
by: Jacques | last post by:
I'm experiencing the following problem The source xml file uses a prefix (wpl:) and look like this (shortened): ----------------------------------------------------------------- <?xml...
1
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...
4
by: Gismo | last post by:
I have got file raport.rld which is an XML file generated by MS Reporting Services. The problem is: in this file are tags from two different namespaces ...
9
by: Richard L Rosenheim | last post by:
I'm trying to query a XML file that was created via ADO.NET. My query wasn't returning anything, and I tracked the problem to an issue with the namespace that ADO.NET specified. When I remove the...
0
by: John Meyer | last post by:
index: <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> <!DOCTYPE html PUBLIC...
5
by: johanneskrueger | last post by:
Hello, I'm currently using <xsl:copy-of select="document(...)/svg:svg"/to embed an SVG file into an XHTML file. I already defined the SVG namespace and assigned svg as its prefix in my XSLT 1.0...
10
by: ellie2905 | last post by:
Hello, I am new to this forum and I am glad I found it because it seems that it will help me with my problem.I have creates a site using jsf components like grid panels and buttons.In the mozilla...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.