Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Complex Selectors

trans edited this page Jul 13, 2011 · 1 revision

Complex Selectors

2011-07-11

While a YPath selector will suffice in many, if not most cases, especially as YPath itself improves, more complex selectors may also be needed at times. So instead of using YPath we might use a mapping that can have all the same fields as the constraint types, plus a path entry.

  ? type: str
    path: //version  
    regexp: /^v/
  : regexp: /^v\d+\.\d+\.\d+/

So this would say that any mapping key named version that contained a String value that started with a v, must have the form of a three point numeric version number.

Clone this wiki locally