Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Custom tags and attributes (sigh)

    OK, despite a lot of (much appreciated!) help from jkd, and helpful code, I am still struggling here.

    I am trying to basically add my own tags, and also add attributes to existing tags. However, I keep messing up and so far nothing has worked properly.

    A week of searching on the net has turned up a couple or articles about XUL and XBL as well as IE behaviours, however I was unable to grasp what was actually happening with the binding.

    I think my main problem is with the DTD... hence I am posting in the XML forum. My JavaScripting is fine (aside from anything extra I need to do for this task) and currently I am trying to sonvert one of my custom elements into tag form.

    Does anyone know of a resource where I could learn exactly what I need for this task? So far everything is either a long-winded intro to XML (which I don't need) or else way above my head talking about DTDs, XBL, XUL etc. and I need a tutorial aimed at programmers like myself who are just not familiar with the language and bindings.

    Or, even if someone could step through some code to show me how to set up a very simple custom tag and attribute... I can pick it up from there I am sure it must be some simple, but key concept that I haven't quite got the hang of yet!

    Cheers to anyone who can lend a hand

    ::] 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."

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    The problem is not your DTD, like I said earlier.

    Custom tags and attributes are no problem with XML, but giving them meaning and action is where the trouble is at. If you're using them in tandem with XHTML, you'll need to modfy the doctype to keep it valid, but that is beside the point.

    What exactly don't you understand about my <rdhtml:slider> example?

    There aren't any tutorials about doing this sort of thing, because it requires extensive background to be able to do it.
    Take things one at a time. Learn IE's behaviors. Work with them. Learn XBL. Work it it. Continue bugging me on MSN. You'll get the hang of it eventually.

    Check out WebFX's <marquee> in Mozilla, check out my <layer> in Mozilla @ layeremu.mozdev.org... look at the slider example I gave you some more... this is really one of things you gotta learn on your own, until someone actually writes a tutorial on it...

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry jkd if I bug you too much heheh

    I have read all the stuff you mentioned, at least a dozen times, and I am sure that the problem must somehow be in my DTD (I am not trying to disagree with you but rather trying to describe what I am having difficulty with).

    You see, I am not sure why I should have to use behaviours and XBL in the first place... or maybe I am just getting confused about exactly what they are in my head (so it may not be the DTD)

    In beetle's post a little while ago he added a custom element to his DTD yet I did not think he used behaviours or XBL...? I thought he bound 'ordinary' JS somehow.

    You are wrong about the tutorials about XBL, just check out the following links:

    http://books.mozdev.org/
    http://www.oreillynet.com/pub/a/mozi...7/app_dev.html

    However both of these are purely for Mozilla, and they don't address what I want in the way I want so in that respect you are correct.

    Ah well I guess I will have to plod on... Once I get the hang of it I will make a short intro and post it here (don't hold your breath! )

    ::] 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."

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by krycek
    You are wrong about the tutorials about XBL, just check out the following links:
    Doesn't contradict me at all. I said that there wasn't a tutorial for adding tags. XBL is XBL, and as more uses.

    But anyway, this is the reason you need behaviors/XBL:

    Hey, look at me! <myTag/>! Ha! I implemented a custom tag!

    Wait, it isn't doing anything.... just renders as an inline, unstyled element. <myTag/> should be a template for some widget.

    *after writing some ViewLink Behaviors and <content/> in XBL*
    Yay, it now renders in its own way. But it just sits there... <select/> boxes open when I click on them! I now <myTag/> to fly around the screen onmouseover!

    *edits behaviors and XBL to includes actions* There!

    <ajv:tsk emotion="amused">Jason should really learn to write his examples properly, closing his XML tags. </ajv:tsk>
    Last edited by Alex Vincent; 12-20-2002 at 03:38 AM.

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heheh well put

    sorry - didn't mean to contradict you but I misunderstood about the tutorials. When you said "this sort of thing" I thought, the whole sort of thing... DOH!

    well yeah I sort of understand where you are coming from with the whole approach to doing this, however... however... hmmm (me thinks) I guess all I can say is I have a lot to learn about this

    ::] 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."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •