Changes

Jump to navigation Jump to search
935 bytes added ,  17:33, 26 March 2015
Created page with "This XQuery Module provides convenience functions for building Web Applications with RESTXQ. =Conventions= All functions in this module are assigned to t..."
This [[Module Library|XQuery Module]] provides convenience functions for building [[Web Application]]s with RESTXQ.

=Conventions=

All functions in this module are assigned to the {{Code|http://basex.org/modules/web}} namespace, which is statically bound to the {{Code|web}} prefix.<br/>
All errors are assigned to the {{Code|http://basex.org/errors}} namespace, which is statically bound to the {{Code|bxerr}} prefix.

=Functions=

==web:media-type==

{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|web:web:content-type|$path as xs:string|xs:string}}<br/>
|-
| '''Summary'''
|Returns the content type of a path by analyzing its file suffix. <code>application/octet-stream</code> is returned if the file suffix is unknown.
|-
| '''Examples'''
|
* <code><nowiki>web:content-type("sample.mp3")</nowiki></code> returns <code>audio/mpeg</code>
|}

=Changelog=

The module was introduced with Version 8.1.

[[Category:XQuery]]
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu