Ben Aston
Ben Aston

Reputation: 55759

Types in XQuery

The node type can be specified as Node()

The string type can be specified as xs:string

Why is the sytax for node not xs:node?

Upvotes: 0

Views: 42

Answers (1)

Jens Erat
Jens Erat

Reputation: 38712

There are mainly two kinds of data types in XQuery: XML native data types and atomic values.

Atomic data types are borrowed from XML Schema, and they put them in a namespace that usually gets the xs prefix assigned, which is also defined in the XQuery specs.

I'm not sure about the parentheses of the XML native data types, I guess they origin from XPath's node tests.

Upvotes: 1

Related Questions