Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-03-21
7
Medium Priority
?
828 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 1050 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 450 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

618 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