Loading TOC...


   $annotation as element(info:annotation)?,
   $database as xs:string?,
   $policy-name as xs:string?,
   $policy-deltas as element(info:options)?
) as xs:string


[DEPRECATED] This function generates a ticket and stores it in the specified database. It returns the id of the generated ticket.

annotation A custom annotation element designed to store implementation-specific data.
database The database in which to store the generated ticket.
policy-name The name of the policy to be used with requests associated with this ticket. If the name is provided but does not exist, an error is thrown. If no name is provided, a stored default policy is used if available. If neither exists, reasonable global defaults are used.
policy-deltas An options node to be used with requests associated with this ticket. It is merged with the effective policy at runtime.


  xquery version "1.0-ml"; 

  import module namespace info = "http://marklogic.com/appservices/infostudio"  
      at "/MarkLogic/appservices/infostudio/info.xqy"; 
  import module namespace infodev = "http://marklogic.com/appservices/infostudio/dev"
      at "/MarkLogic/appservices/infostudio/infodev.xqy";

  let $policy := 
  <options name="default" xmlns="http://marklogic.com/appservices/infostudio">

  let $annotation := <info:annotation>Adding new docs to newdocs</info:annotation>

    infodev:ticket-create($annotation, "testDB", "default", $policy) 

  (: Creates a new ticket. :) 

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