Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

XPath activities

Elisa Beshero-Bondar edited this page Oct 12, 2018 · 13 revisions

Things XPath can do:

XPath: not just for walking trees, and not just in oXygen. Open http://newtfire.org:8338/exist/apps/eXide/index.html . Click “New XQuery”, and erase all content in the editing window. You’ll type (or paste) your XPath in the editing window and run it with the “Eval” button. Try:

current-dateTime()

Put a comma to separate so you can add some XPaths:

current-dateTime(), 
current-date(),

and here's an arrow-operator to send the results of one function to a new function:

current-dateTime(), 
current-date(),
current-dateTime() => format-dateTime('[h].[m01][Pn] on [FNn], [D1o] [MNn]'),

These are "library functions" in XPath (and lots of programming languages have functions like these to do basic tasks.) You can also type things like 2 + 2 (try it). Arithmetic operations: 4 div 2, 5 mod 2

Sequences and Position:

Switch to oXygen. Open URL: http://digitalmitford.org/si.xml

Resource: DHSI XPath class materials: https://ebeshero.github.io/UpTransformation/schedule.html