XUL Tag Plugins

Gerald Bauer <[email protected]>
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hi,

  Sorry if I sound a little bit paranoid but I've got
into way too many flame wars lately and got showered
with abuse.

> Isn't XBL what your average DTD references?

  I haven't studied XBL in detail but my first
impression was that it's way too complex and verbose.
 
> My problem is that it would be about the same as
> manually editing the 
> DTD.  Why not just make a special object tag for
> that?
> 
> For instance, lets say I create a new Component that
> was an extension of 
> another.  Lets call it PhoneField in package
> net.sf.something.
> 
> <object class="net.sf.something.PhoneField"
> name="phone1">
> 	<set name="color" value="red"/>
> </object>

   Luxor supports plugins using the tagdef tag e.g.:

<tagdef class=net.sf.something.PhoneField"
name="phone">

  Once you've defined it you can use it like any
built-in tag e.g.:

  <phone id="phone1" color="red" />

  I'm also working on a appletdef tag and a beandef
tag  for alternative interop plugin architectures.

> That way we can have setters to set properties on
> the object as well 
> without the messiness of creating multiple objects
> and regestering them 
> manually for use with componentRef.  This will let
> those wakey people 
> that are good at making UI's make the UI, and the
> rest of us just bridge 
> it to the logic.
> 
> Of course, I think this would require some
> reflection, but I hear that's 
> not so bad.

   Reflection isn't bad and makes a lot of sense. I
guess the Mozilla folks can't use it because C/C++
doesn't support it.

> The only reason I think this is better other than
> having a static DTD is 
> just the right thing to do, is that editors that
> verify, and parsers 
> that verify, will really freak out if you use tags
> that aren't in the 
> DTD.  Editing the DTD for someone else's spec just
> seems very wrong to 
> me, especially when you could just make a generic
> tag instead.

  As far as I know there is no DTD or XML Schema for
XUL because it will always be incomplete because the
point of XUL is that it is extensible and your own
tags and attributes are more than welcome.

  In the long run, however, it might be a good idea to
have a core set of tags and attributes and then have
different add-on modules you can pick and choose. 

  For now there isn't enough prior art or real-world
experience to try to nail everything down.

  - Gerald 


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.