[OpenSIPS-Users] [OpenXCAP]how to add new element for resource-lists?
CheeWii
quanwei87 at gmail.com
Wed Jan 5 03:43:39 CET 2011
Dear Saúl Ibarra Corretgé,
In earlier time,I just test to use OpenXCAP server. OpenXCAP is real
functional software. And now I want to make some development based on
OpenXCAP,such as add many additional tag for every buddy.
I have learned what you said. Howerver,I still have three questions:
Is The XML schema modified by myself as I like?
Which directory does The XML schema locate in my OpenXCAP?
Is there any reference of how to modify my XML schema?
Thank you very much:)
CheeWii
2011/1/4 Saúl Ibarra Corretgé <saul at ag-projects.com>
> Hi,
>
>
> On 4/1/11 10:42 AM, CheeWii wrote:
>
>> Hi,
>> I have test to add new new element for resource-lists,just as follows:
>> <?xml version="1.0" encoding="utf-8"?>
>> <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
>> <list name="0" xmlns="urn:ietf:params:xml:ns:resource-lists">
>> <display-name>Friends</display-name>
>> <entry uri="1417"
>>
>> xmlns="urn:ietf:params:xml:ns:resource-lists"><display-name>I</display-name><other>
>> http://www.blog.com</other></entry>
>> </list>
>> <list name="1" xmlns="urn:ietf:params:xml:ns:resource-lists">
>> <display-name>Show Buddylist</display-name>
>> </list>
>> </resource-lists>
>> But there is many errors when I put the resource-lists to the OpenXCAP:
>> debian:~/syn_showuser# xcapclient -i buddylist.ini put --account-name=1417
>> put
>>
>> http://xcap.bupt.edu/xcap-root/resource-lists/users/sip:1417@sip6.edu.cn/index
>> 409 Conflict
>> content-type: application/xcap-error+xml;charset=utf-8
>> content-length: 369
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xcap-error
>> xmlns="urn:ietf:params:xml:ns:xcap-error"><schema-validation-error><!--
>> <string>:5:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element
>> '{urn:ietf:params:xml:ns:resource-lists}other': This element is not
>> expected. Expected is ( ##other{urn:ietf:params:xml:ns:resource-lists}* ).
>> --></schema-validation-error></xcap-error>
>> I think this may be caused by the unsupport element, and I have read the
>> RFC4826, still don't know how to add a new element .
>>
>
> You can't just add an element wherever you want :-) You need to check the
> XML schema and see if the element supports extensions, and if it does, then
> you can add whatever you want but you'll need to define a custom namespace
> for the elements you added.
>
> --
> Saúl Ibarra Corretgé
> AG Projects
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110105/13f63165/attachment-0001.htm>
More information about the Users
mailing list