Tijl, I don't know where to get the actual DTD but here is the documentation I can find on the message element.
"A message chunk MAY contain zero or one of each of the following child elements (which may not contain mixed content): body - The textual contents of the message; normally included but not required. The <body/> element MUST NOT have any attributes." Stuffing xml into the body tag doesn't seem to violate this. I do have to escape the tags stuffed into the <body> element. The reason I want to do this is simple though perhaps not sufficient to justify abusing the tag in this way. My client has a lot of functionality specific to managing data about items that are bought and sold. I would like to be able to send that data to anyone with a Jabber client. Stuffing the data in the body tag ensures that they can get the information whereas using a separate namespace might cause the data to be missed. Anyone who receives such a message would be able to understand the contents and decide what to do with it. I may be stating heresy here but I think one of the greatest values of XML is that it is that you can look at it and know what it means as opposed to, say, looking at an EDI document.. Dan ----- Original Message ----- From: Tijl Houtbeckers <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 04, 2003 2:00 PM Subject: Re:Re: [JDEV] client to client communication using jabber? > "Dan" <[EMAIL PROTECTED]> wrote on 4-1-2003 18:42:23: > > > >From what I can gather from the specs it is also perfectly legal to > >send XML payloads within the BODY element. Is this correct? > > I doubt that the DTD for a message allows you to put additional XML > into a body tag, but even if is does.. > > > > >Is there any reason why I should not use the body element for > >packaging xml payloads? > > Why would you want to put it inside the body tag? Besides that it's not > meant for that and the DTD probably does not allow it, why not send it > outside the body tag? Sure winjab doesn't do anything with it.. why > should it? It doesn't understand your namespace. Only your own app has > to understand it. > > The fact that winjab actually *shows* the XML you put in the body just > indicates that either Winjab is buggy when parsing XML, or that you're > actually not sending XML but a normal (escaped) character sequence. > > > > -- > Tijl Houtbeckers > Java/J2ME/GPRS Software Engineer @ Splendo > The Netherlands > > _______________________________________________ > jdev mailing list > [EMAIL PROTECTED] > http://mailman.jabber.org/listinfo/jdev
smime.p7s
Description: application/pkcs7-signature
