[JDEV] Jabber DTD ...

Max Horn max at quendi.de
Sun Jun 3 11:31:51 CDT 2001


At 11:59 Uhr -0700 03.06.2001, Scott Cote wrote:
>Thanks for the reply. My (limited) understanding of XML parsing rules
>lead me to the same conclusion. After I posted, I looked deeper for a
>reason for the '?' modifier. Looking at a fragment from jabber:iq:register:
>
><!ELEMENT query ((instructions? | username? | password? | name? | email? |
>address? | city? | state? | zip? | phone? | url? | date? | misc? | text? |
>remove?)*)>
>
>I started to think the intent was to limit you to a maximum of one of each
>as in:
>
><!ELEMENT query ((instructions? , username? , password? , name? , email? ,
>address? , city? , state? , zip? , phone? , url? , date? , misc? , text? ,
>remove?)*)>
>
>This makes a little more sense to me. Allowing multiple username and
>password elements, for example, would seem to me to be a bad idea.

You are right, the intent was to limit it to at most element each. 
However, what I said earlier is still valid: the expressions (a? | 
b?)* and (a | b)* are identical.

The problem is that we wanted to allow the elements to appear in any 
order but at most once. DTDs are simply to limited to express this, I 
think. At least we didn't find a way to do it.

XML Schemas for Jabber are being created, and they resolve this ambiguity.


>Could you point me to the protocol guru/author? I'm re-tooling an old
>Win32 server project of mine to use the Jabber protocol. I just want
>to get it right.

Well, just ask on this mailing list ;) The high lord of Jabber is, of 
course, Jeremie Miller, but several other people (including me) know 
the protocol quite well, too ;)


Max
-- 
-----------------------------------------------
Max Horn
C++/ObjC/Java Developer

email: <mailto:max at quendi.de>
phone: (+49) 6151-494890



More information about the JDev mailing list