[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Context paths (and the Edition Engraver)
From: |
Dan Eble |
Subject: |
Re: Context paths (and the Edition Engraver) |
Date: |
Tue, 21 Jan 2020 12:50:18 -0500 |
On Jan 21, 2020, at 11:31, Jan-Peter Voigt <address@hidden> wrote:
> I'd like that, though it would be a quite invasive change.
> And if we stay with the string for the context id and then use
> lists/paths in the \context statement like
> \new Staff = "choir" << \new Voice = "soprano" …
>
> and then use
> \context Voice = choir.soprano
>
> it would be inconsistent with \new <Context> = "…"
>
> I will write down some more text about this topic later.
I see similarities with languages like CSS and XPATH select nodes in a DOM.
Notation borrowed directly from them will not integrate well into LilyPond, but
it might be fruitful to ask how we could modify expressions like these to fit
in.
%% find the voice in the example quoted above, very specifically
\context Staff#choir > Voice#soprano { … } % CSS
\context Staff[@id=choir]/Voice[@id=soprano] { … } % XPATH
%% ditto, but using context type only
\context Staff > Voice { … } % CSS
\context Staff/Voice { … } % XPATH
%% ditto, but using ID only
\context #choir > #soprano { … } % CSS
\context [@id=choir]/[@id=soprano] { … } % XPATH
%% find the context where the rehearsalMark property is defined
\context [rehearsalMark] { … } % CSS
\context [@rehearsalMark] { … } % XPATH
—
Dan
- Context paths (and the Edition Engraver), Dan Eble, 2020/01/19
- Re: Context paths (and the Edition Engraver), David Kastrup, 2020/01/20
- Re: Context paths (and the Edition Engraver), Kieren MacMillan, 2020/01/21
- Re: Context paths (and the Edition Engraver), Jan-Peter Voigt, 2020/01/21
- Re: Context paths (and the Edition Engraver), Kieren MacMillan, 2020/01/21
- Re: Context paths (and the Edition Engraver),
Dan Eble <=
- Re: Context paths (and the Edition Engraver), David Kastrup, 2020/01/21
- Re: Context paths (and the Edition Engraver), Dan Eble, 2020/01/21
- Re: Context paths (and the Edition Engraver), David Kastrup, 2020/01/21
- Re: Context paths (and the Edition Engraver), Dan Eble, 2020/01/21
- Re: Context paths (and the Edition Engraver), David Kastrup, 2020/01/21
- Re: Context paths (and the Edition Engraver), Jan-Peter Voigt, 2020/01/22
- Re: Context paths (and the Edition Engraver), Kieren MacMillan, 2020/01/22
- Re: Context paths (and the Edition Engraver), Dan Eble, 2020/01/21
- Re: Context paths (and the Edition Engraver), Carl Sorensen, 2020/01/21
- Re: Context paths (and the Edition Engraver), Dan Eble, 2020/01/21