Matthias Brantner has proposed merging lp:~zorba-coders/zorba/ann-vs-an into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ann-vs-an/+merge/105910

use an instead of ann prefix in the documentation
-- 
https://code.launchpad.net/~zorba-coders/zorba/ann-vs-an/+merge/105910
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/code/headers_svg/zorba_headers_dependencies.xqi'
--- doc/code/headers_svg/zorba_headers_dependencies.xqi	2012-05-03 12:31:51 +0000
+++ doc/code/headers_svg/zorba_headers_dependencies.xqi	2012-05-15 23:59:19 +0000
@@ -24,14 +24,14 @@
 import module namespace html = "http://www.zorba-xquery.com/modules/converters/html";;
 import module namespace functx = "http://www.functx.com/";;
 
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
 declare variable $z:headersCollector := <headers/>;
 
 declare variable $z:dependenciesCollector := <dependencies/>;
 
 (: This function fills the $z:headersCollector :)
-declare %private %ann:sequential function z:collect-header (
+declare %private %an:sequential function z:collect-header (
   $folderPath as xs:string,
   $headerName as xs:string,
   $dependenciesFileName as xs:string) 
@@ -43,7 +43,7 @@
 };
 
 (: This function fills the $z:dependenciesCollector :)
-declare %private %ann:sequential function z:collect-dependency (
+declare %private %an:sequential function z:collect-dependency (
   $header1 as xs:string,
   $header1URL as xs:string,
   $header2Original as xs:string,
@@ -57,7 +57,7 @@
 };
 
 (: This function collects the information from files.html file :)
-declare %ann:sequential function z:fill-headersCollector (
+declare %an:sequential function z:fill-headersCollector (
   $doxygenCodePath as xs:string
 )
 {
@@ -136,7 +136,7 @@
 
 
 (: This function collects the information from every *.html file generated by Doxygen:)
-declare %ann:sequential function z:fill-dependenciesCollector (
+declare %an:sequential function z:fill-dependenciesCollector (
     $doxygenCodePath as xs:string
 )
 {
@@ -228,4 +228,4 @@
     ',z:get-nodes($doxygenCodePath),';
     ',z:get-edges(),';
 }')
-};
\ No newline at end of file
+};

=== modified file 'doc/cxx/examples/context.cpp'
--- doc/cxx/examples/context.cpp	2012-05-03 12:31:51 +0000
+++ doc/cxx/examples/context.cpp	2012-05-15 23:59:19 +0000
@@ -376,10 +376,10 @@
       (*lQuery)
         << "module namespace mymodule = 'http://www.zorba-xquery.com/mymodule';" << std::endl
         << "import module namespace dml = 'http://www.zorba-xquery.com/modules/store/static/collections/dml';" << std::endl
-        << "declare namespace ann = 'http://www.zorba-xquery.com/annotations';" << std::endl
+        << "declare namespace an = 'http://www.zorba-xquery.com/annotations';" << std::endl
         << "declare variable $mymodule:var  := 'myvar';" << std::endl
         << "declare collection mymodule:collection;" << std::endl
-        << "declare %ann:automatic %ann:value-equality index mymodule:index" << std::endl
+        << "declare %an:automatic %an:value-equality index mymodule:index" << std::endl
         << "  on nodes dml:collection(xs:QName('mymodule:collection'))" << std::endl
         << "  by ./foo as xs:string;" << std::endl;
       return StreamResource::create(lQuery.release(), &releaseStream);

=== modified file 'doc/python/examples/test0.xq'
--- doc/python/examples/test0.xq	2012-05-03 12:31:51 +0000
+++ doc/python/examples/test0.xq	2012-05-15 23:59:19 +0000
@@ -14,19 +14,19 @@
  : limitations under the License.
 :)
 
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
 declare variable $sequence := (65 to 90);
 declare variable $var := 1;
 
-declare %ann:sequential function local:foo()
+declare %an:sequential function local:foo()
 {
   $var := $var + 1;
   $var
 };
 
 
-declare %ann:sequential function local:bar()
+declare %an:sequential function local:bar()
 {
   for $i in (1 to 10)
   return

=== modified file 'doc/zorba/link_crawler2.dox'
--- doc/zorba/link_crawler2.dox	2012-02-28 21:02:58 +0000
+++ doc/zorba/link_crawler2.dox	2012-05-15 23:59:19 +0000
@@ -23,7 +23,7 @@
 import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";;
 import module namespace file = "http://expath.org/ns/file";;
 
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 declare namespace xhtml="http://www.w3.org/1999/xhtml";;
 declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";;
 declare namespace err="http://www.w3.org/2005/xqt-errors";;
@@ -38,13 +38,13 @@
 declare variable $local:processed-external-links := xs:QName("processed-external-links");
 
 
-declare %ann:sequential function local:create-containers()
+declare %an:sequential function local:create-containers()
 {
   map:create($local:processed-internal-links, xs:QName("xs:string"));
   map:create($local:processed-external-links, xs:QName("xs:string"));
 };
 
-declare %ann:sequential function local:delete-containers(){
+declare %an:sequential function local:delete-containers(){
   for $x in map:available-maps()
   return map:delete($x);
 };
@@ -60,7 +60,7 @@
 return  if($sb = "") then  $s1 else $sb
 };
 
-declare %ann:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string?
+declare %an:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string?
 {
    variable $absuri;
    try{
@@ -89,7 +89,7 @@
 };
 
 
-declare %ann:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string*
+declare %an:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string*
 {  distinct-values( for $y in  ($content//*:a/string(@href),
                               $content//*:link/string(@href),
                               $content//*:script/string(@src),
@@ -100,7 +100,7 @@
 };
 
 
-declare %ann:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{
+declare %an:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{
 
       distinct-values( 
          let $search := fn:analyze-string($content, "(&lt;|&amp;lt;|<)(((a|link|area).+?href)|((script|img).+?src))=([""'])(.*?)\7")
@@ -110,7 +110,7 @@
 };
 
 
-declare %ann:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) 
+declare %an:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) 
 {
   if(count($http-result) ge 1) 
     then 
@@ -120,14 +120,14 @@
     else map:insert($map-name, <RESULT>broken</RESULT>, $url)
 };
 
-declare %ann:sequential function local:process-link($x as xs:string, $baseUri as xs:string, $n as xs:integer) as item()*{
+declare %an:sequential function local:process-link($x as xs:string, $baseUri as xs:string, $n as xs:integer) as item()*{
  if(local:is-internal($x))
        then local:process-internal-link($x, $baseUri, $n);
        else local:process-external-link($x, $baseUri);
 
 };
 
-declare  %ann:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){
+declare  %an:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){
   if(not(empty(map:get($local:processed-external-links, $x))))
          then   exit returning false();
          else {}
@@ -159,7 +159,7 @@
 };
 
 
-declare  %ann:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){
+declare  %an:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){
       (: if($n=3) then exit returning (); else {} :)
       if(not(empty(map:get($local:processed-internal-links, $x))))
             then exit returning false();

=== modified file 'doc/zorba/options.dox'
--- doc/zorba/options.dox	2012-05-03 12:31:51 +0000
+++ doc/zorba/options.dox	2012-05-15 23:59:19 +0000
@@ -284,9 +284,9 @@
 As an example, the following snippet declares a nondeterministic random function.
 
 \code
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
-declare %ann:nondeterministic function random:random() as xs:integer external;
+declare %an:nondeterministic function random:random() as xs:integer external;
 \endcode
 
 If not specified otherwise, all functions are being treated as deterministic.
@@ -300,15 +300,15 @@
 Side effects can be made with statements.
 An expression is sequential if it contains statements that have side effects (updating some XML, assigning a variable in scope outside of the expression) or that affect the control flow (break, continue, exit returning), or if it invokes a sequential function.
 Analogously to nondeterministic functions, the compiler needs to be able to infer if an expression is sequential.
-In order to do so, Zorba provides the <tt>%ann:sequential</tt> and <tt>%ann:nonsequential</tt> annotations.
-The <tt>%ann:sequential</tt> annotation must be used to declare (external) functions that have side effects.
-If non of these annotations is present, the default for a function is to be annotated as <tt>%ann:nonsequential</tt>.
-If a function invokes a sequential function but is itself not declared sequential (i.e. no annotation or <tt>%ann:nonsequential</tt>), an error is raised (zerr:XSST0004).
+In order to do so, Zorba provides the <tt>%an:sequential</tt> and <tt>%an:nonsequential</tt> annotations.
+The <tt>%an:sequential</tt> annotation must be used to declare (external) functions that have side effects.
+If non of these annotations is present, the default for a function is to be annotated as <tt>%an:nonsequential</tt>.
+If a function invokes a sequential function but is itself not declared sequential (i.e. no annotation or <tt>%an:nonsequential</tt>), an error is raised (zerr:XSST0004).
 
 For example, the <tt>http:post</tt> function of the http-client module is declared as sequential because invoking it might cause a side effect (e.g. a payment with paypal).
 
 \code
-declare %ann:sequential function http:post(
+declare %an:sequential function http:post(
   $href as xs:string,
   $body as item(),
   $content-type as xs:string) as item()+ { ... }
@@ -318,25 +318,25 @@
 In plain XQuery without scripting, global variables (i.e. those declared in the prolog of a module) can not be assigned a value.
 In scripting (i.e. if the scripting feature is enabled), however, values can be assigned to a variable.
 
-In order to allow the developer to prevent variable assignments (even with scripting), Zorba provides the <tt>%ann:nonassignable</tt> annotation.
+In order to allow the developer to prevent variable assignments (even with scripting), Zorba provides the <tt>%an:nonassignable</tt> annotation.
 
 For example, preventing a variable from being assigned in scripting mode could be done as follows:
 
 \code
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
-declare %ann:nonassignable variable $var := 3;
+declare %an:nonassignable variable $var := 3;
 \endcode
 
 If a value is assigned to a nonassignable variable, the error <tt>XSST0007</tt> in the Zorba error namespace is raised.
 
 \paragraph variadic_annotation Variadic Functions
-A function annotated with the <tt>%ann:variadic</tt> annotation is a function of indefinite arity, i.e. one that accepts a variable number of arguments.  
+A function annotated with the <tt>%an:variadic</tt> annotation is a function of indefinite arity, i.e. one that accepts a variable number of arguments.  
 
 For example, the function to create an unordered map with an arbitrary number of key types (see module http://www.zorba-xquery.com/modules/store/data-structures/unordered-map) is declared as follow:
 
 \code
-declare %ann:variadic %ann:sequential function map:create(
+declare %an:variadic %an:sequential function map:create(
   $name as xs:QName,
   $key-type as xs:QName) as empty-sequence() external;
 \endcode
@@ -396,17 +396,17 @@
 O(1.6^n) to O(n).
 
 In order to explicitly disable function caching, the user can specify the 
-<tt>%ann:no-cache</tt> annotation.
+<tt>%an:no-cache</tt> annotation.
 
-In addition, the user can use the <tt>%ann:cache</tt> annotation to cache the 
+In addition, the user can use the <tt>%an:cache</tt> annotation to cache the 
 results of functions other than the ones that are automatically cached. However, 
 this will only work if the function is not updating and its parameter and return
 types are subtypes of xs:anyAtomicType; otherwise, Zorba will raise a warning 
-(zwarn:ZWST0005) and simply ignore the %ann:cache annotation.
+(zwarn:ZWST0005) and simply ignore the %an:cache annotation.
 
 Please note, that explicitly enforcing caching for sequential or nondeterministic
 functions might not give the intended result. In such cases, Zorba will raise a
-warning (zwarn:ZWST0006) but obey the %ann:cache annotation.
+warning (zwarn:ZWST0006) but obey the %an:cache annotation.
 
 
 \paragraph no_copy_rule_annotation Avoiding Node Copying in Node Constructors.
@@ -432,7 +432,7 @@
 
 <ul>
 <li>
-<b>%ann:must-copy-input-nodes</b>. This annotation has an associated value, which
+<b>%an:must-copy-input-nodes</b>. This annotation has an associated value, which
 is a list of integer literals. The meaning of the annotation is the following:
 If a number N appears in the value, then the function requires that any nodes
 that are bound to the N-th parameter when the function is called, must belong to
@@ -442,7 +442,7 @@
 result (or any subtree of it) may be given as input to such an external function.
 </li>
 <li>
-<b>%ann:propagates-input-nodes</b>. This annotation has an associated value, which
+<b>%an:propagates-input-nodes</b>. This annotation has an associated value, which
 is a list of integer literals. The meaning of the annotation is the following:
 If a number N appears in the value, then the function may return to its caller
 a node n that is bound to the N-th parameter, or a node in the subtree of n. This
@@ -466,17 +466,17 @@
 However, for completeness, we also list all of the annotations here.
 
 <ul>
-  <li><b>%ann:mutable, %ann:queue, %ann:append-only, %ann:const</b> Determines whether a collection is mutable, queue (FIFO), append-only, or const (not mutable). The default annotation is mutable. </li>
-
-  <li><b>%ann:ordered, %ann:unordered</b>  Annotations to specify whether the order of nodes in a collection must be preserved. The default is ordered.</li>
-
-  <li><b>%ann:read-only-nodes, %ann:mutable-nodes</b> If a collection is annotated with read-only-nodes, the nodes in the collection can not be modified using the XQuery Update Facility. The default is %ann:mutable-nodes.</li>
-
-  <li><b>%ann:unique, %ann:nonunique</b> Unique indexes make sure that the relationship between index keys and values is one-to-one. The default is %ann:nonunique.</li>
-
-  <li><b>%ann:value-equality, %ann:value-range, %ann:general-range, %ann:general-equality</b> Determine whether the index is a value or general equality or value range index, respectively. The default is %ann:value-equality.</li>
-
-  <li><b>%ann:automatic, %ann:manual</b> If an index is declared as automatic, Zorba guarantees that the index is maintained automatically. The default is %ann:manual.</li>
+  <li><b>%an:mutable, %an:queue, %an:append-only, %an:const</b> Determines whether a collection is mutable, queue (FIFO), append-only, or const (not mutable). The default annotation is mutable. </li>
+
+  <li><b>%an:ordered, %an:unordered</b>  Annotations to specify whether the order of nodes in a collection must be preserved. The default is ordered.</li>
+
+  <li><b>%an:read-only-nodes, %an:mutable-nodes</b> If a collection is annotated with read-only-nodes, the nodes in the collection can not be modified using the XQuery Update Facility. The default is %an:mutable-nodes.</li>
+
+  <li><b>%an:unique, %an:nonunique</b> Unique indexes make sure that the relationship between index keys and values is one-to-one. The default is %an:nonunique.</li>
+
+  <li><b>%an:value-equality, %an:value-range, %an:general-range, %an:general-equality</b> Determine whether the index is a value or general equality or value range index, respectively. The default is %an:value-equality.</li>
+
+  <li><b>%an:automatic, %an:manual</b> If an index is declared as automatic, Zorba guarantees that the index is maintained automatically. The default is %an:manual.</li>
 
 </ul>
 

=== modified file 'doc/zorba/scripting_spec.html'
--- doc/zorba/scripting_spec.html	2012-05-03 12:31:51 +0000
+++ doc/zorba/scripting_spec.html	2012-05-15 23:59:19 +0000
@@ -192,7 +192,7 @@
          </li>
       </ul>
             
-      <p>This specification makes use of the prefix ann for some annotations, bound with the namespace http://www.zorba-xquery.com/annotations</p>
+      <p>This specification makes use of the prefix an for some annotations, bound with the namespace http://www.zorba-xquery.com/annotations</p>
           
       <h1><a name="id-extensions-to-processing-model"></a>2. Extensions to the Processing Model
       </h1>
@@ -509,13 +509,13 @@
                   <b>Definitions:</b>
                       
       <p>
-                           XQSX allows the built-in annotations %ann:assignable and %ann:nonassignable
+                           XQSX allows the built-in annotations %an:assignable and %an:nonassignable
                            to be used in a Prolog variable declaration. If both annotations are used, a static error is raised.
       </p>
                       
       <p>
          [An <b>assignable prolog variable</b> is a global
-                           variable whose declaration specifies %ann:assignable, and
+                           variable whose declaration specifies %an:assignable, and
                            may have its
                            value changed by an assign statement.]
          
@@ -523,7 +523,7 @@
                       
       <p>
          [An <b>unassignable prolog variable</b> is a global
-                           variable whose declaration specifies %ann:nonassignable, and may not have its
+                           variable whose declaration specifies %an:nonassignable, and may not have its
                            value changed by an assign statement.]
          
       </p>
@@ -565,14 +565,14 @@
                   <b>Definitions:</b>
                       
       <p>
-                           XQSX allows the built-in annotations %ann:sequential and %ann:nonsequential
+                           XQSX allows the built-in annotations %an:sequential and %an:nonsequential
                            to be used in a Prolog function declaration. If both annotations are used, a static error is raised.
       </p>
                       
       <p>
                            
          [A <b>non-sequential function</b>
-                           is a function whose declaration specifies %ann:nonsequential .
+                           is a function whose declaration specifies %an:nonsequential .
                              ]
          
                            
@@ -581,7 +581,7 @@
       <p>
                            
          [A <b>sequential function</b>
-                             is a function whose declaration specifies the annotation %ann:sequential.]
+                             is a function whose declaration specifies the annotation %an:sequential.]
          
                          
       </p>
@@ -1594,7 +1594,7 @@
       <p>The following function returns true or false
                   according to whether its parameter is a known user name, and logs the event:
       </p>
-            <pre>declare %ann:sequential function validate-and-log($username as xs:string)
+            <pre>declare %an:sequential function validate-and-log($username as xs:string)
     as xs:boolean {
   variable $log as document-node() := fn:doc("log.xml"); 
 

=== modified file 'doc/zorba/web_crawler.dox'
--- doc/zorba/web_crawler.dox	2012-05-03 12:31:51 +0000
+++ doc/zorba/web_crawler.dox	2012-05-15 23:59:19 +0000
@@ -45,13 +45,13 @@
 declare variable $local:processed-internal-links := xs:QName("processed-internal-links");
 declare variable $local:processed-external-links := xs:QName("processed-external-links");
 
-declare %ann:sequential function local:create-containers()
+declare %an:sequential function local:create-containers()
 {
   map:create($local:processed-internal-links, xs:QName("xs:string"));
   map:create($local:processed-external-links, xs:QName("xs:string"));
 };
 
-declare %ann:sequential function local:delete-containers(){
+declare %an:sequential function local:delete-containers(){
   for $x in map:available-maps()
   return map:delete($x);
 };
@@ -75,7 +75,7 @@
                                          <tidyParam name="new-inline-tags" value="nav header section article footer xqdoc:custom d c options json-param" />
                                         </options>;
 
-declare %ann:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string?
+declare %an:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string?
 {
    variable $absuri;
    try{
@@ -90,7 +90,7 @@
    $absuri
 };
 
-declare %ann:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string*
+declare %an:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string*
 {  distinct-values( for $y in  ($content//*:a/string(@href),
                               $content//*:link/string(@href),
                               $content//*:script/string(@src),
@@ -101,7 +101,7 @@
 };
 
 
-declare %ann:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) 
+declare %an:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) 
 {
   if(count($http-result) ge 1) 
     then 
@@ -119,7 +119,7 @@
   else {}
 };
 
-declare  %ann:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){
+declare  %an:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){
       if(not(empty(map:get($local:processed-internal-links, $x))))
             then exit returning false();
               else {}
@@ -181,7 +181,7 @@
 When the parsing fails, we fallback to using regex for extracting the links.
 
 \code
-declare %ann:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{
+declare %an:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{
 
       distinct-values( 
          let $search := fn:analyze-string($content, "(&lt;|&amp;lt;|<)(((a|link|area).+?href)|((script|img).+?src))=([""'])(.*?)\7")
@@ -196,7 +196,7 @@
 Some websites return error for HEAD, in this case we revert to use GET.
 
 \code
-declare  %ann:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){
+declare  %an:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){
   if(not(empty(map:get($local:processed-external-links, $x))))
          then   exit returning false();
          else {}

=== modified file 'doc/zorba/xqddf.dox'
--- doc/zorba/xqddf.dox	2012-05-03 12:31:51 +0000
+++ doc/zorba/xqddf.dox	2012-05-15 23:59:19 +0000
@@ -121,7 +121,7 @@
 as the type of the root nodes. Both employee and article documents may be
 updated during their lifetime. Instead, the months-related information is fixed
 (can not change), so the nodes of the months collection are declared as
-'%ann:read-only-nodes'. Furthermore, the collection itself is declared '%ann:const', meaning
+'%an:read-only-nodes'. Furthermore, the collection itself is declared '%an:const', meaning
 that no months may be added to or deleted from this collection after it is
 created and initialized. Finally, we want the order of the month documents
 within their containing collection to be the same as the actual order of the
@@ -143,13 +143,13 @@
 
   import schema namespace news-schemas = "http://www.news.org/schemas";;
 
-  declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+  declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
   declare collection news-data:employees as schema-element(news-schema:employee)*;
 
   declare collection news-data:articles as node()*;
 
-  declare %ann:const %ann:ordered %ann:read-only-nodes collection news-data:months
+  declare %an:const %an:ordered %an:read-only-nodes collection news-data:months
     as schema-element(news-schema:month)*;
 
   declare variable $news-data:employees := xs:QName("news-data:employees");
@@ -177,7 +177,7 @@
 months collection. In fact, months must be initialized during creation because
 it is a constant collection, so no documents can be added to it later. The
 months are inserted in the collection in the order from January to December, and
-since the collection was declared as '%ann:ordered', this order is preserved by the
+since the collection was declared as '%an:ordered', this order is preserved by the
 associated document container.
 
 \code
@@ -339,12 +339,12 @@
 
 Zorba defines three categories of collection annotations:
 
-<strong>update mode</strong> (with possible values '%ann:const', '%ann:mutable', '%ann:append-only', or '%ann:queue'),
-<strong>ordering mode</strong> (with possible values '%ann:ordered' or '%ann:unordered'), and
-<strong>document update mode</strong> (with possible values '%ann:read-only-nodes' and '%ann:mutable-nodes').
+<strong>update mode</strong> (with possible values '%an:const', '%an:mutable', '%an:append-only', or '%an:queue'),
+<strong>ordering mode</strong> (with possible values '%an:ordered' or '%an:unordered'), and
+<strong>document update mode</strong> (with possible values '%an:read-only-nodes' and '%an:mutable-nodes').
 
-If not specified, the default values for update and ordering mode are '%ann:mutable' and '%ann:unordered', respectively.
-The default value for the document update mode is '%ann:mutable-nodes'.
+If not specified, the default values for update and ordering mode are '%an:mutable' and '%an:unordered', respectively.
+The default value for the document update mode is '%an:mutable-nodes'.
 
 It is a static error [err::XQST0106] if a collection declaration contains more than one value for the same property.
 An <strong>ordered collection</strong> is a collection into which the ordering of documents is assumed to be meaningful for the application, and as a result, programmers can explicitly control the placement of documents via appropriate updating functions.
@@ -352,12 +352,12 @@
 A <strong>constant collection</strong> is one that is created with an initial set of documents and
 does not allow any subsequent insertions to or deletions from this initial set.
 
-An '%ann:append-only' collection does not allow any deletions at all and restricts insertions to take place at the "end" only, i.e., all new documents must be inserted after all existing ones.
-This implies a user-visible document ordering, and as a result, an '%ann:append-only' collection must also be declared as '%ann:ordered' [err:XQST0106].
-A '%ann:queue' collection forbids both insertions and deletions in/from the "middle"; only documents at
+An '%an:append-only' collection does not allow any deletions at all and restricts insertions to take place at the "end" only, i.e., all new documents must be inserted after all existing ones.
+This implies a user-visible document ordering, and as a result, an '%an:append-only' collection must also be declared as '%an:ordered' [err:XQST0106].
+A '%an:queue' collection forbids both insertions and deletions in/from the "middle"; only documents at
 the front of the collection may be deleted, and new documents can be inserted only at the end of a collection.
-Like '%ann:append-only', '%ann:queue' collections must be declared as '%ann:ordered' [err:XQST0106].
-If the document update mode of a collection is '%ann:read-only-nodes' then an error is raised [<a href="#ERRZDDY0010" title="zerr:ZDDY0010">zerr:ZDDY0010</a>] every time a node of the collection appears as the target node of an updating expression; otherwise no such error is raised.
+Like '%an:append-only', '%an:queue' collections must be declared as '%an:ordered' [err:XQST0106].
+If the document update mode of a collection is '%an:read-only-nodes' then an error is raised [<a href="#ERRZDDY0010" title="zerr:ZDDY0010">zerr:ZDDY0010</a>] every time a node of the collection appears as the target node of an updating expression; otherwise no such error is raised.
 
 In addition to the annotations described above, a collection declaration also
 specifies the <strong>collection static type</strong>, i.e., the static type for
@@ -487,10 +487,10 @@
 available collections in the dynamic context of the invoking module, an error is
 raised [<a href="#ERRZDDY0003" title="zerr:ZDDY0003">zerr:ZDDY0003</a>].</li>
   <li>The result of the function is a sequence consisting of the root nodes in
-the collection. If the collection is declared as '%ann:ordered', the ordering of the
+the collection. If the collection is declared as '%an:ordered', the ordering of the
 nodes in the result will reflect the order into which nodes were inserted in the
 collection by the XQDDF node insertion functions (see \ref
-updating_collections). If the collection is declared as '%ann:unordered', the ordering
+updating_collections). If the collection is declared as '%an:unordered', the ordering
 of the nodes in the result is implementation-dependent. In both cases, the nodes
 in the sequence are, by definition, in document order. For unordered
 collections, this document ordering is guaranteed to be stable within a query
@@ -602,11 +602,11 @@
   <li>If the given expanded QName does not identify a collection among the
 available collections in the dynamic context of the invoking module, an error is
 raised [<a href="#ERRZDDY0003" title="zerr:ZDDY0003">zerr:ZDDY0003</a>].</li>
-  <li>If the update mode of the collection is '%ann:const', '%ann:append-only', or '%ann:queue', an
+  <li>If the update mode of the collection is '%an:const', '%an:append-only', or '%an:queue', an
 error is raised [<a href="#ERRZDDY0004" title="zerr:ZDDY0004">zerr:ZDDY0004</a>],
 [<a href="#ERRZDDY0005" title="zerr:ZDDY0005">zerr:ZDDY0005</a>], or [<a
 href="#ERRZDDY0006" title="zerr:ZDDY0006">zerr:ZDDY0006</a>], respectively.</li>
-  <li>If the collection is '%ann:unordered', an error is raised [<a href="#ERRZDDY0012"
+  <li>If the collection is '%an:unordered', an error is raised [<a href="#ERRZDDY0012"
 title="zerr:ZDDY0012">zerr:ZDDY0012</a>].</li>
   <li>The expression that is given as the second argument to the function call
 is evaluated. The result of the evaluation is called the source sequence. If the
@@ -646,7 +646,7 @@
 The insert-nodes-last function is evaluated the same way as the insert-nodes-first function except:
 
   <ul>
-  <li>If the collection is '%ann:append-only' or '%ann:queue', the insertion is allowed (i.e.,
+  <li>If the collection is '%an:append-only' or '%an:queue', the insertion is allowed (i.e.,
 the errors ZDDY0005 or ZDDY0006 are not raised).</li>
   <li>The result of the function is an empty XDM instance and a pending update
 list that consists of a single update primitive:
@@ -679,11 +679,11 @@
   <li>If the given expanded QName does not identify a collection among the
 available collections in the dynamic context of the invoking module, an error is
 raised [<a href="#ERRZDDY0003" title="zerr:ZDDY0003">zerr:ZDDY0003</a>].</li>
-  <li>If the update mode of the collection is '%ann:const', '%ann:append-only', or '%ann:queue', an
+  <li>If the update mode of the collection is '%an:const', '%an:append-only', or '%an:queue', an
 error is raised [<a href="#ERRZDDY0004" title="zerr:ZDDY0004">zerr:ZDDY0004</a>],
 [<a href="#ERRZDDY0005" title="zerr:ZDDY0005">zerr:ZDDY0005</a>], or [<a
 href="#ERRZDDY0006" title="zerr:ZDDY0006">zerr:ZDDY0006</a>], respectively.</li>
-  <li>If the collection is '%ann:unordered', an error is raised [<a href="#ERRZDDY0012"
+  <li>If the collection is '%an:unordered', an error is raised [<a href="#ERRZDDY0012"
 title="zerr:ZDDY0012">zerr:ZDDY0012</a>].</li>
   <li>The expression that appears as the second argument to the function call is
 evaluated. The expression must return a single node, called the target node. If
@@ -758,7 +758,7 @@
 a collection, an error is raised [<a href="#ERRZDDY0011"
 title="zerr:ZDDY0011">zerr:ZDDY0011</a>]. Let $nodes be the deletion
 sequence.</li>
-  <li>If the update mode of a collection of any node is '%ann:const', '%ann:append-only', or '%ann:queue', an
+  <li>If the update mode of a collection of any node is '%an:const', '%an:append-only', or '%an:queue', an
 error is raised [<a href="#ERRZDDY0004" title="zerr:ZDDY0004">zerr:ZDDY0004</a>],
 [<a href="#ERRZDDY0007" title="zerr:ZDDY0007">zerr:ZDDY0007</a>], or [<a
 href="#ERRZDDY009" title="zerr:ZDDY009">zerr:ZDDY009</a>], respectively.</li>
@@ -994,24 +994,24 @@
 keywords to specify the domain and key expressions respectively. The "as"
 keyword specifies a target atomic data type which the result of the key
 expression must match with (after atomization). The index is declared as a
-'%ann:value-equality' index. This means that it can be used to find the employees in
+'%an:value-equality' index. This means that it can be used to find the employees in
 a particular city, but not in a "range" of cities. In other words, the index is
 not aware of any ordering among city names. Finally, the maintenance property of
-the index is set to "automatically maintained" ('%ann:automatic'). Briefly, an automatically
+the index is set to "automatically maintained" ('%an:automatic'). Briefly, an automatically
 maintained index is one whose maintenance is the responsibility of Zorba rather
 than the XQuery programmers. 
 
 The second index declaration assigns the name
 news-data:ArtCountEmp to the index. Its domain expression selects all employees
 who are journalists. Its key expression computes the number of articles written
-by the "current" journalist. This index is declared as a "value range" ('%ann:value-range') index,
+by the "current" journalist. This index is declared as a "value range" ('%an:value-range') index,
 which means that it can be used to find journalists whose article count is
 within a given range. Finally, the index is also declared as "manually
-maintained" ('%ann:manual'), which means that programmers must explicitly request that the index
+maintained" ('%an:manual'), which means that programmers must explicitly request that the index
 be synchronized with the underlying data. 
 
 The last index declaration assigns the name news-data:EmpMgr to the index. 
-The index is declared as a '%ann:general-equality' index, which, like '%ann:value-equality'
+The index is declared as a '%an:general-equality' index, which, like '%an:value-equality'
 means that the index does not maintain its keys in any order. The index key
 expression selects, for each employee E, the ids of the employees managed by E. 
 Notice that this set of ids may be empty. The index will contain an entry mapping 
@@ -1031,26 +1031,26 @@
 
   import schema namespace news-schemas = "http://www.news.org/schemas";;
 
-  declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+  declare namespace an = "http://www.zorba-xquery.com/annotations";;
 
   declare collection news-data:employees as schema-element(news-schema:employee)*;
 
   declare collection news-data:articles as node()*;
 
-  declare %ann:const %ann:ordered %ann:read-only-nodes collection news-data:months
+  declare %an:const %an:ordered %an:read-only-nodes collection news-data:months
     as schema-element(news-schema:month)*;
 
-  declare %ann:automatic %ann:value-equality index news-data:CityEmp
+  declare %an:automatic %an:value-equality index news-data:CityEmp
     on nodes cdml:collection(xs:QName("news-data:employees"))/employee
     by .//station/city as xs:string;
 
-  declare %ann:manual %ann:value-range index news-data:ArtCountEmp
+  declare %an:manual %an:value-range index news-data:ArtCountEmp
     on nodes cdml:collection(xs:QName("news-data:employees"))/employee[./position/@kind eq "journalist"]
     by count(for $art in cdml:collection(xs:QName("news-data:articles"))//article
              where $art/empid = ./id
              return $art) as xs:integer;
 
-  declare %ann:automatic %ann:general-equality index news-data:EmpMgr
+  declare %an:automatic %an:general-equality index news-data:EmpMgr
     on nodes cdml:collection(xs:QName("news-data:employees"))/employee
     by ./manages//@empid;
 
@@ -1246,13 +1246,13 @@
 is the operation where the index contents are
 updated so that they reflect the index definition with respect to the current
 snapshot of the data. Zorba offers two maintenance modes: manual and
-automatic. If an index is declared as '%ann:manual', index maintenance
+automatic. If an index is declared as '%an:manual', index maintenance
 is done only when the function <a href="#refresh_index">idml:refresh-index</a> 
 is invoked inside a query. Essentially, in manual mode
 maintenance is in the control of the query programmers, and the index may become
 stale between two consecutive calls to the <a href="#refresh_index">
 idml:refresh-index</a> function. In contrast, if an
-index is declared as '%ann:automatic', Zorba guarantees that the index stays up-to-date at any given time.
+index is declared as '%an:automatic', Zorba guarantees that the index stays up-to-date at any given time.
 
 In this example, the CityEmp index was declared as automatic. The <a
 href="#query_index_maintenance">"index-maintenance"</a> query shown below transfers
@@ -1276,7 +1276,7 @@
 not be able to maintain it in an efficient way. Furthermore, the index contains
 "statistical" information, so it may be acceptable if its contents are not
 always in sync with the underlying data. For these reasons, the ArtCountEmp
-index was declared as '%ann:manual'.
+index was declared as '%an:manual'.
 
 <a name="query_index_maintenance" id="query_index_maintenance"></a>
 \code
@@ -1335,10 +1335,10 @@
 
   Note: the following annotations are accepted within the context of an index declaration:
 
-     %ann:unique, %ann:nonunique,
-     %ann:value-range, %ann:value-equality, 
-     %ann:general-range, %ann:general-equality,
-     %ann:manual or %ann:automatic
+     %an:unique, %an:nonunique,
+     %an:value-range, %an:value-equality, 
+     %an:general-range, %an:general-equality,
+     %an:manual or %an:automatic
 
 \endcode
 
@@ -1375,19 +1375,19 @@
 or in another imported module (even if the declarations are consistent).
 
 Zorba defines three index properties which are syntactically expressed as annotations:
-<strong>uniqueness</strong> (with possible values '%ann:unique' or '%ann:nonunique'),
-<strong>usage</strong> (with possible values '%ann:value-range', '%ann:value-equality', '%ann:general-range', or '%ann:general-equality'), and 
-<strong>maintenance mode</strong> (with possible values '%ann:manual' or '%ann:automatic').
+<strong>uniqueness</strong> (with possible values '%an:unique' or '%an:nonunique'),
+<strong>usage</strong> (with possible values '%an:value-range', '%an:value-equality', '%an:general-range', or '%an:general-equality'), and 
+<strong>maintenance mode</strong> (with possible values '%an:manual' or '%an:automatic').
 The syntax allows the values for these properties to be listed in any order or not be specified at all.
-If not specified, the default values for uniqueness, usage, and maintenance mode are '%ann:nonunique', 
-'%ann:value-equality', and '%ann:automatic', respectively.
+If not specified, the default values for uniqueness, usage, and maintenance mode are '%an:nonunique', 
+'%an:value-equality', and '%an:automatic', respectively.
 It is a static error [zerr::XQST0106] if more than one value is listed in an index declaration for any of these properties.
 
 The uniqueness property determines the kind of relationship between keys and
-domain nodes: if the index is declared as '%ann:unique', Zorba makes sure that the
+domain nodes: if the index is declared as '%an:unique', Zorba makes sure that the
 relationship is one-to-one, that is, each index entry associates a key value
 (or key tuple in the case of value indexs) with exactly one domain node. 
-Otherwise, if the index is '%ann:nonunique', multiple domain nodes may have the 
+Otherwise, if the index is '%an:nonunique', multiple domain nodes may have the 
 same key value, and as a result, each index entry associates a key with a 
 set of domain nodes. In the current implementation, it is not allowed to declare
 an index as unique if it is a general index whose IndexKeyTypeDecl is either absent
@@ -1413,7 +1413,7 @@
 kind of value or general comparison predicates. 
 
 The maintenance mode specifies how index maintenance is done. The current Zorba
-implementation offers two maintenance modes: '%ann:manual' and '%ann:automatic'. For a 
+implementation offers two maintenance modes: '%an:manual' and '%an:automatic'. For a 
 <strong>manual index</strong>, maintenance is done only when the function <a
 href="#refresh_index">idml:refresh-index</a> (described in \ref index_maintenance)
 is invoked inside a query. Essentially, in manual mode maintenance is in the
@@ -1445,7 +1445,7 @@
   <li>They must not reference and variables other than the ones defined inside
       the expressions themselves [<a href="#ERRZDST0031">zerr:ZDST0031</a>].</li>
 
-  <li>If the index is declared as '%ann:automatic', an error is raised
+  <li>If the index is declared as '%an:automatic', an error is raised
       [<a href="#ERRZDST0034">zerr:ZDST0034</a>] if the domain and/or the key 
       expressions are too complex for Zorba to perform index maintenance in an 
       efficient manner (see \ref index_maintenance for details)</li>
@@ -1999,7 +1999,7 @@
 which stale index contents are updated so that the index becomes up-to-date.
 Zorba offers two maintenance modes: manual and automatic.
 
-If an index is declared as "automatically maintained" (i.e. '%ann:automatic'), Zorba guarantees that
+If an index is declared as "automatically maintained" (i.e. '%an:automatic'), Zorba guarantees that
 every time a PUL is applied, the index is made up-to-date before the 
 upd:apply-updates function returns. Ideally, all indexes should be automatically
 maintained, but in general, index maintenance can be a very expensive operation
@@ -2011,7 +2011,7 @@
 scratch. However, even incremental maintenance can have a high cost, which
 may make the manual mode described below the preferred choice.
 
-If an index is declared as "manually maintained" (i.e. '%ann:manual'), it is the responsibility of
+If an index is declared as "manually maintained" (i.e. '%an:manual'), it is the responsibility of
 the programmers to keep the index up-to-date. This can be done using the 
 idml:refresh-index updating function described below. Since Zorba does not
 take any maintenance action during PUL applications, manually maintained

=== modified file 'doc/zorba/xqdoc/src/zorba_module_dependencies.xqi'
--- doc/zorba/xqdoc/src/zorba_module_dependencies.xqi	2012-05-03 12:31:51 +0000
+++ doc/zorba/xqdoc/src/zorba_module_dependencies.xqi	2012-05-15 23:59:19 +0000
@@ -20,7 +20,7 @@
 
 module namespace z = "http://www.zorba-xquery.com/module-dependencies";;
 
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
 declare namespace zm = "http://www.zorba-xquery.com/manifest";;
 
 import module namespace file = "http://expath.org/ns/file";;
@@ -87,7 +87,7 @@
   xs:boolean(data($z:ZorbaManifest/module[@uri= z:fix-uri($moduleUri)]/@isCore))
 };
 
-declare %ann:sequential function z:create-collection-categories (
+declare %an:sequential function z:create-collection-categories (
 $collectionName as xs:QName,
 $xqdocXmlPath as xs:string)
 {
@@ -100,7 +100,7 @@
   return dml:apply-insert-nodes($collectionName, $xqdoc);
 };
 
-declare %ann:sequential function z:create-collections($xqdocXMLPath as xs:string) 
+declare %an:sequential function z:create-collections($xqdocXMLPath as xs:string) 
 { 
   variable $xqdocBuildPath as xs:string := 
   fn:substring-before($xqdocXMLPath, fn:concat(file:directory-separator(),"xml"));
@@ -130,7 +130,7 @@
   z:fill_edgesCollector();
 };
 
-declare %ann:sequential function z:delete-collections()
+declare %an:sequential function z:delete-collections()
 { 
   dml:delete-nodes(dml:collection(xs:QName("z:collection")));                           
   ddl:delete(xs:QName("z:collection"));
@@ -139,7 +139,7 @@
 (:~
  : Fill the $z:nodesCollector with all the available modules.
  :)
-declare %ann:sequential function z:fill-nodesCollector() as xs:string*
+declare %an:sequential function z:fill-nodesCollector() as xs:string*
 {
   for $category in $z:level1Weight
   return
@@ -169,7 +169,7 @@
     else () 
 };
 
-declare %private %ann:sequential function z:collect-node (
+declare %private %an:sequential function z:collect-node (
   $moduleURI as xs:string, 
   $name as xs:string,
   $lModuleProject as xs:string,
@@ -185,7 +185,7 @@
 (:~
  : Fill $z:edgesCollector with all the edges (the links between the nodes) for both modules and eternal library dependencies.
  :)
-declare %ann:sequential function z:fill_edgesCollector()
+declare %an:sequential function z:fill_edgesCollector()
 {  
   for $docNode in dml:collection(xs:QName("z:collection"))
   let $xqdoc := $docNode/xqdoc:xqdoc
@@ -222,7 +222,7 @@
       ())
 };
 
-declare %private %ann:sequential function z:collect-edge (
+declare %private %an:sequential function z:collect-edge (
   $catUri as xs:string?,
   $nameFrom as xs:string?,
   $uriFrom as xs:string?,  

=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq'
--- modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq	2012-05-03 12:31:51 +0000
+++ modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq	2012-05-15 23:59:19 +0000
@@ -58,7 +58,7 @@
 (:~
  :
  : This warning is raised if the user explicitly enables caching
- : of function results (using the %ann:cache annotation) but the function
+ : of function results (using the %an:cache annotation) but the function
  : is updating or its parameter and return types are not subtypes of
  : xs:anyAtomicType.
  : 
@@ -68,7 +68,7 @@
 (:~
  :
  : This warning is raised if the user explicitly enables caching
- : of function results (using the %ann:cache annotation) and the function
+ : of function results (using the %an:cache annotation) and the function
  : is annotated as sequential or nondeterministic.
  : 
 :)

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-05-13 15:33:57 +0000
+++ src/diagnostics/diagnostic_en.xml	2012-05-15 23:59:19 +0000
@@ -2496,7 +2496,7 @@
     <diagnostic code="ZWST0005" name="CACHING_NOT_POSSIBLE">
       <comment>
         This warning is raised if the user explicitly enables caching
-        of function results (using the %ann:cache annotation) but the function
+        of function results (using the %an:cache annotation) but the function
         is updating or its parameter and return types are not subtypes of
         xs:anyAtomicType.
       </comment>
@@ -2518,7 +2518,7 @@
     <diagnostic code="ZWST0006" name="CACHING_MIGHT_NOT_BE_INTENDED">
       <comment>
         This warning is raised if the user explicitly enables caching
-        of function results (using the %ann:cache annotation) and the function
+        of function results (using the %an:cache annotation) and the function
         is annotated as sequential or nondeterministic.
       </comment>
       <value>"$1": function caching might not give the intended result because the function is declared as $2</value>

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to