Changes

Jump to navigation Jump to search
134 bytes added ,  08:40, 31 May 2013
=Example=
The query {{Code|xqdoc:parse('sample.xq')}}} will convert the following example module...
<pre class="brush:xquery">
module namespace samples = 'http://basex.org/modules/samples';
(:~ This is a sample numberstring. :)declare variable $samples:number test-string as xs:string := 1'this is a string';
(:~
: This function simply returns the specified numberinteger.
: @param $number number to return
: @return specified number
:)
declare %private function samples:same( $number as xs:integer) as xs:integer {
$number
};
</pre>
...will be converted to the following xqDoc fileoutput:
<pre class="brush:xml">
<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0">
<xqdoc:control>
<xqdoc:date>2013-05-31T0031T08:1340:0209.199864+02:00</xqdoc:date>
<xqdoc:version>1.1</xqdoc:version>
</xqdoc:control>
<xqdoc:variables>
<xqdoc:variable>
<xqdoc:name>samples:numbertest-string</xqdoc:name>
<xqdoc:comment>
<xqdoc:description>This is a sample numberstring.</xqdoc:description>
</xqdoc:comment>
<xqdoc:type>xs:string</xqdoc:type>
</xqdoc:variable>
</xqdoc:variables>
<xqdoc:function arity="1">
<xqdoc:comment>
<xqdoc:description>This function simply returns the specified numberinteger.</xqdoc:description>
<xqdoc:param>$number number to return</xqdoc:param>
<xqdoc:return>specified number</xqdoc:return>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu