Hey folks. I've got a page that uses ONE extra attribute for LI elements, and I'd like it to validate (it's the ONLY error on my page). I downloaded the XHTML1 DTD from the W3C and added this
Code:
<!ELEMENT li %Flow;>
<!ATTLIST li
%attrs;
ignore CDATA #IMPLIED
>
Then saved the DTD and pointed my DOCTYPE at this DTD. However, the page still doesn't validate. Did I do this incorrectly? Or can this not be done?
Did you save the DTD locally or to a website? Remember, the W3C Validator can't really read your hard drive.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary https://alexvincent.us/blog
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
[
<!ATTLIST li
ignore CDATA #IMPLIED
>
]>
Your DTD was correctly written, I believe.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary https://alexvincent.us/blog
Moderators gotta know something about what their forum discusses.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary https://alexvincent.us/blog
Tha last ]> shows up on my page as text. Some tiny syntactical oversight perhaps? Or just stoopid IE? I tried a couple variations but either the text kept showing up, or the page didn't validate. Thanks for the help!
Hi beetle, I don't want to interrupt your thread (well I already have so tough! ) but it seems like an ideal place to post the following questions:
1. Could someone who knows post an example of how to extend the DTD with any property? Just quickly? I mean, it appears to me that there are two main extensions that can be done (excluding events) - adding a new tag, such as <mytag>, and adding an attribute <div myattr>. It would be nice to have a simple guideline on how to do this so that it would be syntatically correct, and also work ok
2. Events - is it possible to simply add an event to the defined events list? Like, how would that work? I mean, if you added your own event and then captured it, how would it ever be triggered? How would the browser know when to trigger it? Or is this just not possible.
It would also be nice to know what browser support there is for the above
I know that beetle has covered part of that but his request is quite specific, mine is more general as I have the same problem as beetle atm but in a different way. It may also be an idea to make this thread sticky once answered, because I could not find this info elsewhere in the forum (I guess beetle couldn't either)
Cheers people!
::] krycek [::
__________________ ithium | SOAPI | SDP | PTPScript manual "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
Originally posted by krycek 2. Events - is it possible to simply add an event to the defined events list? Like, how would that work? I mean, if you added your own event and then captured it, how would it ever be triggered? How would the browser know when to trigger it? Or is this just not possible.
In Mozilla, you can fire any event you want, even custom events via:
var evt = document.createEvent('Events');
evt.initEvent('mycustomEvent', false, false);
someEventTarget.dispatchEvent(evt);
IE only allows the firing of custom events on scriptlets, which makes it pretty much worthless.
but surely those 'custom' events can only be chosen from a bigger list of pre-defined events? Coz let's say you wanted to make a new event, called, say, onReachLeft which will fire whenever an animated object reaches the left side of the screen, how would you attach this? So that the event fires, I mean? I don't get that bit
::] krycek [::
__________________ ithium | SOAPI | SDP | PTPScript manual "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
do you think IE will ever support this XBL stuff etc. etc.
::] krycek [::
__________________ ithium | SOAPI | SDP | PTPScript manual "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
Originally posted by krycek do you think IE will ever support this XBL stuff etc. etc.
IE supports Element and ViewLink behaviors. Not quite as powerful as XBL, but it also doesn't suffer from the same, near-crippling global namespace issue Javascript has in XBL.
Behaviors are a little easier, but I find XBL to be cleaner. I used to have examples of widgets I wrote using "custom tags" and behaviors/xbl to make then do stuff. Not sure if I still do, but I once had a:
<rdhtml:window/> widget which created a draggable DOM window that could be added by simple markup instead of Javascript that polluted the global namespace of the webpage (pure encapsubility)
so it would be possible to do this x-browser? I mean, make an encapsulated custom element, using both methods, one for each browser? that would be very cool... do you have any links to articles about doing this x-browser, or are you willing to share any of the code you have? (Just how to construct the element etc.)
it sounds very very interesting!
::] krycek [::
__________________ ithium | SOAPI | SDP | PTPScript manual "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."