Reputation: 417
What is the difference between xs:string
and xs:string+
in XQuery in Marklogic or please point me to an article that can help understand.
Upvotes: 1
Views: 327
Reputation: 9130
The difference is:
xs:string
represents one stringxs:string+
represents a sequence containing one or more stringsYou can read more about it here.
An occurrence indicator can be used at the end of a sequence type to indicate how many items can be in a sequence. The occurrence indicators are:
?
For zero or one items*
For zero, one, or many items+
For one or many items If no occurrence indicator is specified, it is assumed that the sequence can have one and only one item. For example, a sequence type ofxs:integer
matches one and only one atomic value of typexs:integer
. A sequence type ofxs:string*
matches a sequence that is either the empty sequence or contains one or more atomic values of type ...
Upvotes: 5