This function creates a new named paste buffer name and returns a document identifier that may be used on subsequent calls to functions that operate on document trees. The pubid and subtype arguments are used to specify the document type for the paste buffer. See the doc_open function for details. If omitted, the document type of the current document is used.
If the paste buffer name exceeds the number of characters the operating system file naming convention accepts, the name is truncated if the paste buffer is saved as a file. You may later have difficulty locating the file when the buffer is loaded.