[JDEV] Custom messages/extensions

Peter Millard me at pgmillard.com
Wed Jul 31 12:06:04 CDT 2002


Richard Dobson wrote:
> But arnt extensions supposed to normally be in an X element in the
> message? Thats how it always used to be wasnt it?

It's mostly been this way just because it was easiest, and we were defining
the namespace which was getting embedded into the message packet. It doesn't
have to be this way :) Basically, the root element being embedded must be in
the namespace which is being defined. So for example, putting xhtml into a
message uses the <html> root tag, since thats what the namespace defines. So
an XHTML message packet looks like:

<message>
  <body>hi</body>
  <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
      <h1>hi</h1>
    </body>
  </html>
</message>

When the JSF is defining the actual namespace which is getting embedded into
the message, the common "convention" is to use the x tag, but the namespace
is really what matters.

Hope this clears up the confusion.

pgm.





More information about the JDev mailing list