Skip to content

Latest commit

 

History

83 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShapePath.js

A typescript library for executing ShapePaths

This is a monorepo which holds:

language/evaluation changes

2021-07-17 ericP: changed predicate separator for ::thisTripleExpr from . to ~ because . is legal in localNames

2026-08-19: [N] selects the node at position N, counting from 0.

It is the grammar's shorthand for [index() = N] (filterExpr -> Filter(index, [numericExpr])), and index() has always reported the 0-based position, so the two have to agree. This is not XPath's [1]-is-first: XPath's aggregate is position(), ShapePath's is index(), and the rename is the signal. If ShapePath would rather count from 1, index() moves with it.

Until this was written down, [N] ignored N and passed every node whose position was truthy, so [0], [1] and [2] all selected the same thing -- everything but the first.

About

A typescript library for executing ShapePaths

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages