DocumentSet.AddCollection Method (AnyUri, IXPathNavigable[])DocumentSet.AddCollection Method (AnyUri, IXPathNavigable())DocumentSet::AddCollection Method (AnyUri^, array
<IXPathNavigable^>^)
Syntax
Public Function AddCollection( _ uri As AnyUri, _ collection As System.Xml.XPath.IXPathNavigable[] _ ) As Boolean
public bool AddCollection( AnyUri uri, System.Xml.XPath.IXPathNavigable[] collection )
public: bool AddCollection( AnyUri^ uri, array<System.Xml.XPath::IXPathNavigable^> collection )
Parameters
- uri
Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^
The collection URI to associate with collection, or
null
a null reference (Nothing
in Visual Basic)nullptr
to set the default collection.- collection
Type: System.Xml.XPath.IXPathNavigable[]System.Xml.XPath.IXPathNavigable()
array
<System.Xml.XPath::IXPathNavigable^>^The collection of nodes to add to the DocumentSetDocumentSetDocumentSet, or
null
a null reference (Nothing
in Visual Basic)nullptr
if the collection is unavailable.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
true
True
true
if the document was added to the DocumentSetDocumentSetDocumentSet;
false
False
false
otherwise.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException |
uri is null
a null reference (Nothing in Visual Basic)
nullptr .
|
ArgumentExceptionArgumentExceptionArgumentException |
|
Remarks
If any of the nodes in collection have a document URI that is not empty, then the document should already be added to the document set.
If uri is already in the document set then no change is made and this method returns
false
False
false
.
If collection is null
a null reference (Nothing
in Visual Basic)
nullptr
then during evaluation of an XQuery program, XSL
transformation or XPath expression, fn:doc-available
will return false
for
uri, and the fn:doc
function will raise an FODC0002
error.