473,406 Members | 2,312 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,406 software developers and data experts.

Error in XSL 'Reference to undeclared namespace prefix: 'supr'. '

Hi I have a xml file tag as below:

Expand|Select|Wrap|Line Numbers
  1. <supr:TABLE_INFO>
  2. <supr:field>
  3.     <supr:tag>seq-num</supr:tag>
  4. </supr:field>
  5. </supr:TABLE_INFO>
  6.  

Here I have written a XSL for get above xml tag values and
the same is are below:
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4.  
  5. <xsl:template match="/">
  6.   <html>
  7.   <body>
  8.   <h2>Test.xml</h2>
  9.   <table border="1">
  10.     <tr bgcolor="#9acd32">
  11.     <xsl:for-each select="supr:TABLE_INFO/supr:field">
  12.       <th><xsl:value-of select="supr:seq-num"/></th>
  13.       </xsl:for-each>
  14.     </tr>
  15.   </table>
  16.   </body>
  17.   </html>
  18. </xsl:template>
  19. </xsl:stylesheet>
  20.  
After linking the xls with xml i am getting the
error like:

'The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Reference to undeclared namespace prefix: 'asup'.


Please let any one know me that what will be the issue here and how can I fix the same.

Thanks in Advance
Shree Naik
Mar 22 '11 #1
2 7276
Dormilich
8,658 Expert Mod 8TB
you have to tell XSL/XML what the namespace "supr" is (even if it is the null namespace)
Mar 22 '11 #2
jkmyoung
2,057 Expert 2GB
Your xml should also specify the namespace eg xmlns:supr="www.somenamespace.com" otherwise it is invalid xml.
Mar 22 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Romeo Disca | last post by:
Hello newsgroup, i'm new to xml - what's wrong with this piece code here? i have these two files: test.xml ---- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE a SYSTEM "test.ent"
2
by: Dominik Amon | last post by:
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"> ...
2
by: Dale Anderson | last post by:
I have a schema that I'm trying to read. The schema has an element named 'GrantApplication' and one with a namespace prefix named 'SF424:GrantApplication'. When I try to read this schema in, I...
5
by: SenthilSS | last post by:
My application produces XML Data files which have XML namespace qualified XML elements (nodes), but the namespace itself is not declared in the data file. My task is to read these data files in a...
4
by: jb | last post by:
I have discovered that when the WSDL is auto-generated in .NET (i.e. http://.../MyService.asmx?WSDL): * Prior to SP1, it generated xmlns:s0="http://mynamespace/" in <wsdl:definitions>, and then...
0
by: Max QRO | last post by:
I have created a web service in C# that needs to receive a SOAP request from some system I have no control over. An example of the SOAP request is given below:- <?xml version='1.0'...
1
by: John Slagle | last post by:
I am trying to parse this XML fragment: <xsl:apply-templates select="_APPLICATION/MORTGAGE_TERMS" mode="attrSpec"> <xsl:with-param name="elem" select="'LENDERLOANNUM'"> </xsl:with-param>...
1
by: Tanja Schaettler | last post by:
Hello! I have an existing SOAP message which looks like: <?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"...
2
by: scottpet | last post by:
Hi, I want to add a namespace prefix to the root node of an object I am serializing to XML. I have been reading though this article:...
3
by: Markus Bauer | last post by:
Hello, I have a problem with the namespace prefix. I need to add nodes to a xml file that is not created by me. It has a namespace with the prefix "NFD". So an already existing node looks...
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: 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
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
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...
0
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...
0
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,...

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.