distributed-text-services / specifications

Specifications for the DTS API
https://w3id.org/dts
28 stars 10 forks source link

May ?start and ?end reference passages in different depths of a document? #265

Closed kbrueckmann closed 3 months ago

kbrueckmann commented 3 months ago

I'm working with the latest version of the documentation right now (https://distributed-text-services.github.io/specifications/versions/unstable/#navigation-endpoint) and a bit confused about a phrase in the table "Usage of down, ref, start and end":

A member array of CitableUnits including the citation tree between the start and end CitableUnits inclusive, down to a depth relative to the deeper of the CitableUnits identified by start and end.

If I understand this correctly, the two passages identified by start and end may be on different "levels" or "depths" in the document; e.g. start=C1 and end=C3.E1 (instead of just C1 and C3 as in example 6 of the specs). In our implementation (still in the works) we had planned on not allowing that as it might lead to dts:wrapper-contents that are not well-formed for the document endpoint.

Looking at the other examples in the specs, I couldn't find one that includes start/end-values of different levels, so I hope it's just a small irregularity in that table I cited. If so, it might be useful to also explicitly state the restriction somewhere. If not, however, I'd love some hints about how others have implemented this :).

PonteIneptique commented 3 months ago

Hi @kbrueckmann :)

Yes, normally, range can have various depth, we might have removed the example from our documentation when we simplified the docs. I would prefer to have the confirmation of @hcayless or @monotasker in case I am wrong.

As to how to do this, the only implementation I have developed traverse the tree between start and end:

I have been working on a reference implementation, and this mechanism is the only one implemented.

https://github.com/distributed-text-services/MyDapytains

Note that my current implementation does not use dts:wrapper for now.

kbrueckmann commented 3 months ago

Thank you for the quick reply and assistance! I think I got it now.