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
nulla null reference (Nothingin Visual Basic)nullptrto 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
nulla null reference (Nothingin Visual Basic)nullptrif the collection is unavailable.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
trueTruetrue if the document was added to the DocumentSetDocumentSetDocumentSet;
falseFalsefalse 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
falseFalsefalse.
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.
