Solved

The prefix "DRC" for element "DRC:Calendar" is not bound.

Posted on 2007-03-21
7
793 Views
Last Modified: 2013-11-18
Hello,
I have two pages (ASP and XSL),
The ASP page calls the XSL page and has the following in the head section of the ASP page
<STYLE>
@media all
{
DRC\:Calendar
{
behavior: url(calendar.htc);
}
}
</STYLE>
<link rel="Stylesheet" href="calendar.css" />  

I am trying to add a calendar to an XSLT form.
I am getting the following error:
The prefix "DRC" for element "DRC:Calendar" is not bound.
The example shows this <HTML XMLNS:Prefix1 XMLNS:Prefix2="www.sample.com"> and this for XML
<Prefix: CustomTag ID=sID STYLE="behavior:url('calendar.htc')" /> but this give this error...
Element or attribute do not match QName production: QName::=(NCName':')?NCName.
Not sure if this has anything to do with the error.
Any ideas?

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:sd="http://tempuri.org/ds_ContactList.xsd"
xmlns:msdata="http://tempuri.org/ds_ContactList.xsd"
exclude-result-prefixes="sd msdata"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
 
    <!--
        We're outputting HTML 4.0, so set the output method accordingly
    -->
 <xsl:output method="html" version="4.0"/>
 
 <xsl:param name="selfDoc" select="document('')"/>

<SCRIPT type="text/javascript" language="JavaScript">
function onDateSelect1() {
document.form1.startdt1.value = document.form1.MyCalendar1.intervalstart
document.form1.mydiv1.style.visibility = 'hidden'
}
function ShowCalendar1() {
  var e = window.event.srcElement
  document.form1.mydiv1.style.left = e.offsetLeft + e.offsetWidth - document.form1.mydiv1.offsetWidth
  document.form1.mydiv1.style.top = e.offsetTop + e.offsetHeight + 4
  document.form1.mydiv1.style.visibility = 'visible'
  return false;
}
</SCRIPT>
<DIV id="mydiv1" class="style1"
     onmouseover="javascript: this.style.visibility = 'visible'"
     onmouseout="javascript: this.style.visibility = 'hidden'">
<DRC:Calendar id="MyCalendar1"
    dateformat="mmmm, dd yyyy"
    mcount="1"
    dselect="date"
    onintervalselectend="onDateSelect1()"
/>
</DIV>
0
Comment
Question by:TrueBlue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 11

Accepted Solution

by:
Vivek Thangaswamy earned 350 total points
ID: 18769279
Hi

In XML/XSL when you add something with : it will take it as namespace and search for it in your corresponding document.
In your doc it search for DRC: 's namespace. : is to separate your namespace and your tag element

0
 

Author Comment

by:TrueBlue
ID: 18770429
vivethangaswamy,
So how do I fix this?
TIA
0
 
LVL 12

Assisted Solution

by:jkmyoung
jkmyoung earned 150 total points
ID: 18772312
Inside the element, declare the namespace with xmlns like so:

<DRC:Calendar
    xmlns:DRC="http:\\www.somepage.com"
    id="MyCalendar1"
    dateformat="mmmm, dd yyyy"
    mcount="1"
    dselect="date"
    onintervalselectend="onDateSelect1()"
/>

You can also declare the namespace at top in your stylesheet node.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 18772339
You need to add the DRC' s namesace in the top as you added XSL namespace's...

ex:
xmlns:sd="http://tempuri.org/ds_ContactList.xsd"
xmlns:msdata="http://tempuri.org/ds_ContactList.xsd"
exclude-result-prefixes="sd msdata"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
0
 

Author Comment

by:TrueBlue
ID: 18772755
Hi,
I changed the namespace in both places and got the following error:
Top level elements must have a non-null namespace URI
Any ideas?
0
 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 18772804
Your example is illegal because top-level elements may not have a null namespace URI.

for example refer this links
http://www.biglist.com/lists/xsl-list/archives/200302/msg00819.html
http://www.stylusstudio.com/w3c/xslt/stylesheet-element.htm
0
 

Author Comment

by:TrueBlue
ID: 18772934
Do either of you know of a calendar that I can call from two different input statements on a XSL form?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AL3 Files 4 48
VB.Net. Reading xml value 6 38
ASP and Looping Thru a XML Document 4 30
customizing windows 10 taskbar and startmenu 2 37
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question