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

Add content container to eref #952

Open
opoudjis opened this issue Dec 26, 2024 · 1 comment
Open

Add content container to eref #952

opoudjis opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@opoudjis
Copy link
Contributor

In relaton/relaton-models#56 (comment), @andrew2net points out that the current content model of eref, which is a mix of text and elements—

erefType =
    erefAttributes,
    ## Reference cross-reference: modelled as cross-reference to the corresponding bibliographical item in a References section
    CitationType,
    ## The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)
    ErefBody

CitationType =
    ## Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description
    attribute bibitemid { xsd:IDREF },
    (
       ## Describes the location of the cited information resource within the subject of the bibliographic item.
       ## Multiple ``bibLocality``s are interpreted as discontinuous references.
       locality* |
       ## Describes the location of the cited information resource within the subject of the bibliographic item in a multi-level manner.
       ## For example, the hierarchical specification "Part IV, Chapter 3, Paragraphs 22-24" 
       ## is represented as a single `bibLocalityStack`, composed of those three localities
       ## (as opposed to three `bibLocality` references, which would be treated as three discontinuous references).
       ## Multiple ``bibLocalityStack``s are themselves interpreted as discontinuous references
       localityStack*
    ),
    ## Date of the citation, typically date of publication. 
    ## A combination of the date time elements year, month and day should be specified.
    ## Specification of month and day are optional. 
    ## This date is not intended for disambiguation, since `bibitemid`
    ## already identifies the source unambiguously; it is added for ease of processing, in case author-date
    ## citations cannot straightforwardly extract the date from the bibliographic source
    date?

ErefBody =
     ## The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)
     PureTextElement+

—is difficult to process, because ErefBody can be pure text, whereas CitationType is a group of locality elements: he is asking for ErefBody to have a wrapper element.

The request is reasonable, and processing eref as is has made metanorma code complex for having to fish out locality from surrounding plain text. The refactor needed will also not impact PDF, as eref and its contents are resolved to xref with no locality elements in Presentation XML.

It is nonetheless a non-trivial refactor, and I want to defer it until after I do the terms refactor for Presentation XML.

@ronaldtse
Copy link
Contributor

This is blocking the release of the Relaton gems. Please help prioritize this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants