Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XPath 2.0
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Data model == {{Main|XQuery and XPath Data Model}} Every value in XPath 2.0 is a ''sequence'' of ''items''. The items may be ''nodes'' or ''atomic values''. An individual node or atomic value is considered to be a sequence of length one. Sequences may not be nested. Nodes are of seven kinds, corresponding to different constructs in the syntax of [[XML]]: elements, attributes, text nodes, comments, processing instructions, namespace nodes, and document nodes. (The document node replaces the ''root node'' of [[XPath 1.0]], because the XPath 2.0 model allows trees to be rooted at other kinds of node, notably elements.) Nodes may be typed or untyped. A node acquires a type as a result of validation against an [[XML Schema (W3C)|XML Schema]]. If an element or attribute is successfully validated against a particular complex type or simple type defined in a schema, the name of that type is attached as an annotation to the node, and determines the outcome of operations applied to that node: for example, when sorting, nodes that are annotated as integers will be sorted as integers. Atomic values may belong to any of the 19 primitive types defined in the [[XML Schema (W3C)|XML Schema]] specification (for example, string, boolean, double, float, decimal, dateTime, QName, and so on). They may also belong to a type derived from one of these primitive types: either a built-in derived type such as integer or Name, or a user-defined derived type defined in a user-written schema.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)