[JDEV] Adding own namespace
Richard Dobson
richard at dobson-i.net
Fri Jun 13 12:20:08 CDT 2003
It depends on what you are wanting to do, if you want only the user that
stored the information to be able to see it then use Private Storage, if you
need to let otheres access it use Public Storage or a custom namespace, but
IMO Public Storage would be the easiest.
Richard
----- Original Message -----
From: "Bernino Lind" <lind at hlgroup.dk>
To: <jdev at jabber.org>
Sent: Friday, June 13, 2003 5:48 PM
Subject: RE: [JDEV] Adding own namespace
> Dear Richard,
>
> Thats very fine with some rules...
>
> s/jabber/lind/g
>
> But I still need to have some knowledge on the actual implementation.
>
> It sounds as though you can help me Richard - howto implement the
> question in ask?
>
> best regards,
> Bernino Lind
>
> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On Behalf Of
> Richard Dobson
> Sent: Friday, June 13, 2003 10:31 AM
> To: jdev at jabber.org
> Subject: Re: [JDEV] Adding own namespace
>
>
> If you are creating your own non standard namespaces you must not use
> the word jabber in it, you must use something different usually the name
> of your application or your surname e.g. lind:score.
>
> Richard
>
> ----- Original Message -----
> From: "Bernino Lind" <lind at hlgroup.dk>
> To: <jdev at jabber.org>
> Sent: Thursday, June 12, 2003 11:29 PM
> Subject: [JDEV] Adding own namespace
>
>
> > Dear list,
> >
> > I need to add a namespace for some development I am doing.
> >
> > Needed:
> > * store a game id with score and jid in database
> >
> > Aka:
> >
> > <iq type='set' to='score at my-host'>
> > <query xmlns='jabber:score'>
> > <gameid>1</gameid>
> > <score>123</score>
> > </query>
> > </iq>
> >
> > And ofcourse a "get" method to find the score of a particular user.
> >
> > I am very much in doubt of an implementation. I read about the
> > bloodbank example in some jep with jabber:x:data - but there is no
> > implementation guide so I dropped it.
> >
> > I also read the test:iq:url example - ditto problem.
> >
> > What I have done so far, by quessing, is:
> >
> > Add dtd=2 queries to the xdb_sql.xml configuration with a xmlns of
> > jabber:score. Add jabber:score to my jabber.xml configuration with
> > xdb_sql as storage method for all hosts for the xmlns jabber:score.
> >
> > I get 404 and 502: no go.
> >
> > Then I added service description and name. Still no go.
> >
> > In the browse section:
> > <service type="score" jid="score.192.168.0.166" name="score">
> > <ns>jabber:score</ns>
> > </service>
> >
> >
> > In the xdb section:
> > <xdb id="xdbscore">
> > <host/>
> > <ns>jabber:score</ns>
> > <load>
> > <xdb_sql>/usr/local/lib/jabber/xdb_sql.so</xdb_sql>
> > </load>
> > <jabberd:include>/usr/local/etc/xdb_sql.xml</jabberd:include>
> > </xdb>
> >
> >
> > Parallel to yahoo etc. gateway service sections:
> > <service id="score">
> > <host>score.192.168.0.166</host>
> > </service>
> >
> > In the xdb_sql:
> > <!-- ****************** score ********************** -->
> > <querydef name="score-set" dtd="2" type="set"
> > namespace="jabber:score">
> > <text>INSERT INTO score (username,gameid,score) VALUES
> > ('$$user$$', '$$gameid$$','$$score$$')</text>
> > <user>$$user$$</user>
> > <bindvar tag="gameid">$$gameid$$</bindvar>
> > <bindvar tag="score">$$score$$</bindvar>
> > </querydef>
> >
> > <querydef name="score-get" dtd="2" type="get"
> > namespace="jabber:score">
> > <text>SELECT score, date FROM score WHERE username =
> > '$$user$$' AND gameid='$$gameid$$'</text>
> > <user>$$user$$</user>
> > <bindvar tag="gameid">$$gameid$$</bindvar>
> > <top-result><x xmlns='score:iq:get'/></top-result>
> > <bindcol tag="domain" offset="0"/>
> > <bindcol tag="file" offset="1"/>
> > </querydef>
> > </queries>
> >
> > Can anyone send an example of how to configure the server to add a
> > namespace in this way?
> >
> > As you can see this is really the same question previously asked on
> > this
> > list: how to really use the dtd=2???
> >
> > best regards,
> > Bernino Lind
> >
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
> >
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
More information about the JDev
mailing list