TreeViz / metastyle

Styled publication of NeXML/NeXSON trees
MIT License
2 stars 6 forks source link

Figure and tree selectors in the new NexSS #13

Open daisieh opened 10 years ago

daisieh commented 10 years ago

One thing I just thought of while trying to describe the proposed

tag to the NeXML team: if you look at Mike’s translation of the original TSS spec (https://github.com/OpenTreeOfLife/phylostylotastic/blob/master/documentation/nexss%20specification.md), we had previously put a lot of styling specification on the tree selector as an abstract general selector. I think that in the original spec of TSS, since we were styling a phylogenetic tree specifically and not a NeXML/NexSON/Nexus document, we assumed that a stylesheet would only be styling one tree, hence we would have general canvas/tree/scale selectors. However, over the course of the hackathon, it seems that NexSS is evolving more towards a slightly more general specification for styling files that contain trees in them, so therefore could specify more than one tree. Hence the idea of the <figure> element: it would contain the references to the tree that is being styled, etc. A few questions that I thought of in regards to that:

  • Does a <figure> element contain <tree> elements or does it contain some sort of meta property that refers to a tree element?
  • Should the original tree and scale selectors in the TSS spec now be specified as figure tree and figure scale in the NexSS spec? (and is that the correct way to specify descent?)
  • I can't think of more questions right now; I got distracted in the middle of writing this and forgot if I was going somewhere. I am just going to post this issue now.
jimallman commented 10 years ago

Interesting question: Are we trying to handle multi-tree figures in NexSS?

Does a

element contain elements or does it contain some sort of meta property that refers to a tree element?

I would think the latter, but I could be wrong. We might have things to say (via attributes like scale) about each tree... But obviously, these nexss:tree elements need to be clearly distinct from NeXML's tree elements.. maybe nexss:render-tree?

Should the original tree and scale selectors in the TSS spec now be specified as figure tree and figure scale in the NexSS spec? (and is that the correct way to specify descent?)

In CSS, you write a selector like so:

figure tree[id=tree_234] { ... }

... but to me, this doesn't belong in a NexSS stylesheet. Better to have the figure element include one ore more tree elements (as above), with stylesheets applied to either the entire figure or a single tree.