Relying on tag resolution might be too restrictive in theory... but I'd love to see a real world example.

If you are relying on tags, then you gain a lot. There's a clear tag resolution method, and as you pointed out, you can rely on the tags to basically describe a schema as a set of rules that map nodes to tags. YPath is certainly helpful here. Basically, the tag resolution works by comparing the current path to what can be thought of as a YPath pattern (possibly testing the tags of parent nodes), detecting the existence of children using what can be thought of additional children (possibly testing their tags), and assigning a tag accordingly. It is pretty powerful, and given a bit of care if crafting the patterns, allows for highly composable schemas built out of small independent pieces.

Your original proposal is actually pretty close to this...


On Tue, Apr 29, 2014 at 5:34 PM, Trans <> wrote:

I think it would be too limiting to restrict schema to using tags only, e.g. sometimes a schema would depend on some relation between siblings, something that tag resolution is not allowed to do. But given extensive support for tag resolution, a specific schema could be easier to write and maintain.

I see that there is a possible problem in that some cases would not lend themselves clearly to either identification or validation. This has to be discussed. However, I think the problem is inherent in the YAML beast.

I don't think YPath is the best match for tag resolution. As far as I can see, YPath is best suited after composition, whereas tag resolution is related to events (though also to composed mapping key nodes).


"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
Yaml-core mailing list