Open gerritbruening opened 5 years ago
Oh, pointer point to anchor
, that's bad.
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>
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.
Same applies to addSpan
(https://github.com/faustedition/faust-xml/issues/134).
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:
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).
When I have something like
and
the transposition for last stage doesn't work. @thvitt, can you find out how often we have
transpose
that points to amilestone
?