0.9.0 • Published 7 years ago

marcheur v0.9.0

Weekly downloads
74
License
Apache-2.0
Repository
github
Last release
7 years ago

Marcheur

A long, long time ago I used XSLT quite a lot, and while the verbosity was always an issue I did enjoy its tree walking and pattern-matching abilities. On occasion, I have need the same in JS, but the XSLT support there is abysmal.

This library does not intend to replace XSLT, but it can be used to build simple tree walking tools based on a the extremely simple algorithm that is at the heart of XSLT 1 processing.

Install

npm install marcheur

Example

XXX TDB

API

Core

XXX TDB

Matcher

Marcheur can match using any kind of condition. What Matcher exposes is a really simple set of matching conditions that are commonly needed.

XXX TDB

Nodal

This is a small utility, imported on its own, that provides an element creator and attribute remapping for a given context document and set of namespaces.

XXX TDB

qname(name, nsMap)

This function, imported on its own, will take a name (of an element or attribute) and an optional object mapping namespace prefixes to namespace URLs. If the name is a qualified name that matches one of the given prefixes, a { ns, ln } object will be returned with the namespace and local name (ie. without prefix) for the given qualified name; otherwise it will just return { qn } being the provided name.

XXX TDB

0.9.0

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago