Hi Sergei!

Ah okay ... it seems I start understanding what you are trying to do.
You want to map a JID (or something like that) into another JID, e.g.
for building the infamous Jabber-Jabber transport.

Sergei Golovan schrieb:
> So, a full unsecaped JID (with resource) can't be split unambiguously.
> Then I'm afraid we should do something with the XEP.

You will always only handle escaped JIDs when splitting the JID.

If you do unescape the JID, you should do this to get back the mapped
address.

E.g. if you unescape "[EMAIL PROTECTED]" you do not get back
"[EMAIL PROTECTED]" and not "[EMAIL PROTECTED]@jabber.org".

Compare this with the escaping in XML:

If you map "<element>this is XML</element>" in an XHTML document you get:

<p>&lt;element&gt;this is XML&lt;/element&gt;</p>

You will also only be able to unescape the content of the <p/> element
without creating a mess. If you would just unescape everything you would
get <p><element>this is XML</element></p> and with that also no XML
parser could understand what of this is your XHTML and what is your XML
document you wrapped.



Matthias

-- 
Matthias Wimmer      Fon +49-700 77 00 77 70
Züricher Str. 243    Fax +49-89 95 89 91 56
81476 München        http://ma.tthias.eu/

Reply via email to