
view:add-column( $schema-name as xs:string, $view-name as xs:string, $column as element(view:column) ) as empty-sequence()
This function adds column specifications to the current set of column specifications on the named view in the named schema.
xquery version "1.0-ml";
import module namespace view = "http://marklogic.com/xdmp/view"
at "/MarkLogic/views.xqy";
view:add-column("main", "songs",
(view:column("author", cts:element-reference(xs:QName("AUTHOR")))) )
(: Adds an 'author' column to the 'songs' view in the 'main' schema. :)