2009/7/29 Iñaki Baz Castillo <i...@aliax.net>: > 2009/7/29 Eric PTAK <eric.ptak...@gmail.com>: >> I didn't noticed the namespace is not included in the response. >> As you said, you may store in memory a namespace<->prefix map from the first >> xcap fetch (without xpath expression). >> Or the XDMS may include a xmlns attribute in the node fetched with an xpath >> expression. Need a look in specs or another advice to check that point. > > I wonder if there is a specific XCAP query to fetch the > namespaces<->prefixes from the server for a document... I think I > found something about it in the RFC but not sure... must check again > :)
Yes it is: RFC 4825: --------------------------------------------------------------- 7.10. Fetch Namespace Bindings If a client wishes to insert an element or attribute into a document, and that element or attribute is part of a namespace declared elsewhere in the document, the client will need to know the namespace bindings in order to construct the XML content in the request. If the client has a cached copy of the document, it will know the bindings. However, if it doesn't have the whole document cached, it can be useful to fetch just the bindings that are in scope for an element, in order to construct a subsequent PUT request. To get those bindings, the client constructs a URI whose document selector points to the document containing the element whose namespace bindings are to be fetched. The node selector MUST be present following the node selector separator, containing an expression identifying the desired namespace bindings. The query component MUST be present if the node selector makes use of namespace prefixes, in which case the xmlns() expressions in the query component MUST define those prefixes. The client then invokes the GET method. The 200 OK response will contain an "application/xcap-ns+xml" document with the namespace definitions. The format for this document is defined in Section 10. A client cannot set the namespace prefixes in scope for an element. As such, a node selector that identifies namespace prefixes MUST NOT appear in a PUT or DELETE request. --------------------------------------------------------------------- However I would appreciate an example of usage since I don't fully understand how to perform the query. -- Iñaki Baz Castillo <i...@aliax.net> _______________________________________________ Sip-implementors mailing list Sip-implementors@lists.cs.columbia.edu https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors