I need some help understanding how namespaces work in relation to PubSub.
I’ve created an XML schema with various types of objects that I’d like my clients to be able to publish via PubSub. I’m not sure how to associate my schema and traditional XML namespaces with the PubSub schemas.
I’ve created a custom “Location” object, described as:
<xsd:attribute name="latitude" type="xsd:double" use="required"></xsd:attribute> <xsd:attribute name="longitude" type="xsd:double" use="required"></xsd:attribute>
When reading or writing the XML, I use proper namespace syntax like this:
<tns:Location xmlns:tns=“http://seattle1.adspore.com/schema/types” latitude=“42.75663” longitude="-122.4837374"></tns:Location>
I have the ability to control the “tns” prefix, the document writer makes the association between the “http://…” url and the “prefix” where appropriate.
How should this be handled within Smack and Openfire? When I observe the nodes in the Openfire database rows, the “http://seattle1…” portion is actually the node id. This doesn’t look correct.
Any help understanding would be very helpful, there just are not enough examples for me to understand how this works.