Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git
README.md
# Overview
-Relational XPath Map (**rxm**) is a simple, terse database query language
-that produces structured documents.
+Relational XPath Map (**rxm**) is a terse database query language to
+produce structured documents.
The syntax examples show how to produce an XML document, but the same
-mapping could produce any structured format (e.g., JSON, YAML, or TOML).
+mapping could produce any structured format, including JSON.
# Syntax
```
-root > people, # "root" keyword starts the document
-person > person, # maps a node to table context
-.first_name > first, # maps a node to column
-.last_name > name/last, # maps an ancestor node to a column
-.age > @age, # @ maps an attribute to table node
-account.person_id > person.person_id, # performs an inner join
-account > account, # context is now "account" node
-.id > @id,
-^, # pop stack to previous context
-address > address,
-.*; # * globs all columns. ; is WHERE
+root > people, # "root" keyword starts the document
+person > person, # maps a node to table context
+.first_name > first, # maps a node to column
+.last_name > name/last, # maps an ancestor node to a column
+.age > @age, # @ maps an attribute to table node
+account.person_id > person.person_id, # performs an inner join
+account > account, # context is now "account" node
+.id > @id, # account id attribute
+^, # pop stack to previous context
+address > address # switch context to "address" node
+.*; # * globs all columns. ; is WHERE
```
```
-Note: Multiple stack pops (`^`) are allowed per line. If a pop would otherwise
+Note: Multiple stack pops (`^`) are allowed per line; if a pop would otherwise
exceed the root context, the context remains at the root.

Fewer words; updated example code with more commentary.

Author Dave Jarvis <email>
Date 2015-02-08 12:14:02 GMT-0800
Commit e46992c07e80b29589bd883468be104227e31ebf
Parent 7d0726d
Delta 15 lines added, 15 lines removed