lmaurits / BEASTling

A linguistics-focussed command line tool for generating BEAST XML files.
BSD 2-Clause "Simplified" License
20 stars 6 forks source link

Hack BEAST XML using DOM notation? #246

Open Anaphory opened 5 years ago

Anaphory commented 5 years ago

In #153, we mused about

hacking beast xml using some kind of DOM notation in the beastling config

Does that suggestion have any merit?

Anaphory commented 4 years ago

Actually, we might instead hack based on the ID. Something like

[hacking]
samplingProportionPriorFBD.t:beastlingTree, text=<Beta name="distr" alpha="20.0" beta="0.5" />

should be enough. In that example, I opted for , as the separator between ID and property – my choice would have been :, but that is overused in IDs, while , is guaranteed not to be a part of IDs because of BEAST limitations anyway.

This would be a uniform syntax to edit any attribute of any named BEAST object, and with text= we can also access its object hierarchy.

Anaphory commented 4 years ago

The things this syntax cannot do:

Things that need more specification to do: