[JDEV] Genicon Hybrid Solution - should solve the differences

Julian Fitzell julian at beta4.com
Thu Apr 25 00:00:07 CDT 2002


Adam Theo wrote:
> Hate to contribute to this more, but I just got an idea....
> 
> I might have gotten this from reading the thread here, so forgive me if 
> I'm just repeating a position that's already been proposed.
> 
> I just thought of a hybrid of the two positions. I and others want the 
> light and simple method of regexp-like filtering of messages. Others 
> want the powerful and flexible XML solution. We can have both in the 
> same spec. Here's how:
> 
> The <body> of a message includes plaintext keywords marked up in my 
> double-colon convention, as I've laid out before (ex: ::beer:: creates a 
> beer mug, ::moon:: creates a silvery moon). But, outside the <body> tag 
> is an X-tag (jabber's x element), including a "jabber:x:genicon" 
> namespace. This x:genicon area includes other tags defining images for 
> the double-colon keywords in the body.
> 
> An example:
> 
> <message to="mike at theoretic.com" from="theo at theoretic.com">
>   <body>Hi, Mike! I ::email:: the specs to you. Also keep my informed on 
> the PingID codebase by ::email:: not ::jabber::. Oh, yeah, great pics of 
> you at your ::cake:: party.  :-)</body>
>   <x xmlns="jabber:x:genicons">
>     <genicon keyword="jabber" lang="en" icon="lightbulb.png">
>     <genicon keyword="email" lang="en" icon="envelope.png">
>     <genicon keyword="cake" lang="en" icon="birthday-cake.png">
>   </x>
> </message>
> 
> Note there is only one X-tag entry for all instances of the keyword in 
> the body. The icon="" in the X-tag could be anything (URN, relative 
> filename, www resource, etc...), I just used a relative PNG for the 
> example. Also, if there is not an X-tag entry for a keyword in the body, 
> it is assumed that the recipient client knows of it already (either 
> cached or hard-coded from a standard spec). If there is no image for the 
> keyword, then it is displayed as-is, and is still meaningful.
> 
> This has the reliability of a standard plaintext keyword convention, and 
> keeps things separate, but allows for the flexability and extensability 
> of the XML convention.
> 
> Thoughts?
> 

Pretty much what I want to see except I'd like to see a way to specify 
that a keyword represents a certain genicon rather than a certain 
filename.  Maybe there can be two different attributes?

So you could do:

<genicon keyword="etoile" resource="star"/>

or:

<genicon keyword="etoile" icon="http://foo.bar/star.png"/>

This makes it easier to use a different language that isn't standardized 
yet.  It also means that a client can choose to ignore icons with URLs 
to avoid getting hit with porn or whatever (I don't believe that the 
user should have to turn of all genicons to avoid this like Dave seems 
to suggest).

Julian

-- 
julian at beta4.com
Beta4 Productions (http://www.beta4.com)




More information about the JDev mailing list