Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transpose empty elements that span to anchors #627

Open
gerritbruening opened this issue Nov 30, 2018 · 6 comments
Open

transpose empty elements that span to anchors #627

gerritbruening opened this issue Nov 30, 2018 · 6 comments
Assignees
Milestone

Comments

@gerritbruening
Copy link
Contributor

gerritbruening commented Nov 30, 2018

When I have something like

                <transpose f:revType="soon-or-late">
                    <ptr target="#l7172-l7174"/>
                    <ptr target="#l7175-l7177"/>
                </transpose>

and

                                    <milestone xml:id="l7175-l7177" spanTo="#anchor_l7175-l7177" unit="group"/>
                                    <l n="7175">Das Trallern iſt bey mir verloren</l>
                                    <l n="7176">Es krabbelt wohl mir um die Ohren</l>
                                    <l n="7177">Allein zum Herzen dringt es nicht;</l>
                                    <anchor xml:id="anchor_l7175-l7177"/>
                                    <milestone xml:id="l7172-l7174" spanTo="#anchor_l7172-l7174" unit="group"/>
                                    <l n="7172">Das ſind die ſaubern Neuigkeiten</l>
                                    <l n="7173">Wo aus der Kehle, von den Saiten,</l>
                                    <l n="7174">Ein Ton ſich um den andern flicht.</l>
                                    <anchor xml:id="anchor_l7172-l7174"/>

the transposition for last stage doesn't work. @thvitt, can you find out how often we have transpose that points to a milestone?

@gerritbruening

This comment has been minimized.

gerritbruening added a commit to faustedition/faust-xml that referenced this issue Nov 30, 2018
@gerritbruening gerritbruening added this to the 1.1 milestone Nov 30, 2018
@thvitt
Copy link
Member

thvitt commented Nov 30, 2018

Transposed empty elements

Sigil with Transposition ID of transposed el. transposed element non-empty partners spanTo common parent
2 I H.56 #Einweisungsstelle anchor 0
2 II H.22 #start2 anchor 1
2 II H.22 #start1 anchor 1
2 V H.37c #l12005-12012 anchor 1
2 V H.37c #l12013-12019 anchor 1
2 III H.2:1 #gräslich seg 0
2 III H.2:1 #ging-die-Sonne anchor 0
2 III H.2:1 #die-er anchor 0
2 III H.2a:5 #Versumbruch anchor 0
2 III H.7:1 #Versumbruch anchor 0
2 II H.74 #l7172-l7174 anchor 1
2 II H.74 #l7175-l7177 anchor 1
2 V H.1 #after_11283 anchor 1
2 V H.1 #before_11286_b-11287 addSpan 1 anchor sp
2 II H.5a #p132_Indessen-So milestone 1 anchor div
2 II H.5a #p132_Sie-So milestone 1 anchor div
2 I H.52 #Zielposition anchor 0
2 H #before_7495_c anchor 0
H P124 #start_transposition_1 anchor 1
H P124 #start_transposition_2 anchor 1
for $ptr in $faust//transpose/ptr
let $target := id(substring-after($ptr/@target, '#'), $ptr)
for $milestone in $target[not(child::node())]
let $span-end := id(substring-after($milestone/@spanTo, '#'), $milestone),
    $parent := $span-end/..,
    $is-common := if ($span-end) then if ($parent is $span-end/..) then name($parent) else "✘" else "",
    $sigil := data(root($milestone)//idno[@type='faustedition']),
    $partners := for $partner in ($ptr/../ptr except $ptr) return id(substring-after($partner/@target, '#'), $ptr)
return <h:tr>
    <h:td>{$sigil}</h:td>
    <h:td>#{data($milestone/@xml:id)}</h:td>
    <h:td>{name($milestone)}</h:td>
    <h:td>{count($partners[not(child::node())])}</h:td>
    <h:td>{name($span-end)}</h:td>
    <h:td>{$is-common}</h:td>
    </h:tr> 

@thvitt
Copy link
Member

thvitt commented Nov 30, 2018

The transposition doesn’t work because this use case has never been specified and thus never been implemented. The phrase-level transposition in the test manuscript has its xml:ids on lines.

I would very strongly suggest to check whether this couldn’t be handled in some different way (e.g., pointer to l or div or lg or ab). I haven’t looked at the actual cases yet, but transpositions across hierarchy borders might contain all kinds of ambiguities and will not be easy to implement.

@gerritbruening gerritbruening changed the title transpose milestone-to-anchor fragments transpose empty elements that span to anchors Dec 1, 2018
@gerritbruening
Copy link
Contributor Author

Same applies to addSpan (faustedition/faust-xml#134).

@thvitt
Copy link
Member

thvitt commented Dec 3, 2018

This table lists all empty elements that are referred by a transposition pointer. This points to different cases, at least the following can be distinguished:

  1. anchor with ≥ 1 non-empty partner(s): The non-empty segment is moved to the anchor position. Should work ok, although there might be encoding glitches that lead to unexpected whitespace behaviour. Cf. Was Raub, compare the inline apparatus.
  2. anchor with 0 non-empty partner(s): semantics unknown, @gerritbruening you’ll need to check what happens there
  3. milestone/spanTo with common parent: Can be unproblematically encoded using an enclosing element (seg / ab) instead of the milestone approach, which will make the existing implementation work. If this isn’t acceptable implement a preprocessing step

@thvitt thvitt assigned gerritbruening and unassigned thvitt Dec 4, 2018
@gerritbruening
Copy link
Contributor Author

Thanks for the query and its analysis!
I will check nr. 2 for 1.2.
As for nr. 3, I think we already looked out for a suitable enclosing element in @wissenbach|s time, but we didn't find one: seg is not allowed where we would need it, as it's phrase-level. ab is, and l has some time been allowed to appear in ab. It would be slightly abusive, though, since ab is not supposed to be a mere container element (i.e., is not suppused to be what we need).

@thvitt thvitt self-assigned this Dec 12, 2018
@thvitt thvitt modified the milestones: 1.2, 1.3 Jun 5, 2019
@thvitt thvitt modified the milestones: 1.3, 1.4 Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants