view:set-name( $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.
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.