Loading TOC...


   $schema-name as xs:string,
   $view-name as xs:string,
   $new-name as xs:string
) as empty-sequence()


This function renames the named view in the named schema specification.

schema-name The name of the schema specification containing the view.
view-name The current name of the view to be renamed.
new-name The new name of the view. The view name must be unique in the context of the schema in which it resides. A valid view name is a single word that starts with an alpha character. The view name may contain numeric characters, but cannot contain punctuation or special characters.


  xquery version "1.0-ml"; 
  import module namespace view = "http://marklogic.com/xdmp/view" 
      at "/MarkLogic/views.xqy";
  view:set-name("main", "songs", "tunes")

  (: Renames the 'songs' view in the 'main' schema to 'tunes'. :)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.