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

metanorma adds an <aside> element to rfc xml for NOTE: #182

Closed
douglm opened this issue Feb 18, 2023 · 5 comments
Closed

metanorma adds an <aside> element to rfc xml for NOTE: #182

douglm opened this issue Feb 18, 2023 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@douglm
Copy link

douglm commented Feb 18, 2023

Trying to build (locally on my mac) the spec here:

https://github.com/CalConnect/PUBLIC_DRAFTS/tree/master/ical-tasks

Failed with the messages:

sources/draft-ietf-calext-ical-tasks.rfc.xml(344): Error: Element dd has extra content: aside, at /rfc/middle/section[10]/section[4]/dl/dd[1]/aside
sources/draft-ietf-calext-ical-tasks.rfc.xml(9): Error: Invalid document before running preptool.
Unable to complete processing sources/draft-ietf-calext-ical-tasks.rfc.xml
sources/draft-ietf-calext-ical-tasks.rfc.xml(344): Error: Element dd has extra content: aside, at /rfc/middle/section[10]/section[4]/dl/dd[1]/aside
sources/draft-ietf-calext-ical-tasks.rfc.xml(9): Error: Invalid document before running preptool.
Unable to complete processing sources/draft-ietf-calext-ical-tasks.rfc.xml

There is an <aside> element at line 344 - it seems every NOTE: generates an <aside> element

Tried a brew upgrade metanorma

and it told me

 metanorma/metanorma/metanorma 1.4.17.20211007_1 already installed

Edited the xml and removed all the <aside> elements. xml2rfc accepted that.

@ronaldtse ronaldtse added the help wanted Extra attention is needed label Feb 20, 2023
@ronaldtse
Copy link
Contributor

Thank you @douglm for raising this!

@opoudjis could you help review the aside situation?

@CAMOBAP could you please help check the issue with Homebrew?

@douglm
Copy link
Author

douglm commented Feb 20, 2023 via email

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Feb 20, 2023

@ronaldtse @douglm metanorma version looks really old, I investigating right now why brew upgrade doesn't work

As workaround I can suggest try brew uninstall metanorma && brew install metanorma/metanorma/metanorma

Update

metanorma/homebrew-metanorma#84 (comment)

It looks like auto-update is broken for our formula, it hard to say why this may happens. there are possible workarounds for this:

  • brew tap --force-auto-update metanorma/metanorma && brew upgrade metanorma
    or
  • brew update && brew upgrade metanorma
    or
  • brew uninstall metanorma && brew install metanorma/metanorma/metanorma

@opoudjis
Copy link
Contributor

This is a XML RFC v3 schema restriction that I cannot say I welcome.

  • Metanorma allows notes to be embedded in definition lists. In fact, Metanorma prefers to embed notes inside of other blocks (e.g. tables)
  • I see in that document a NOTE after a table, and a NOTE after a list. These will both be embedded into their preceding block by default in Metanorma.
  • I have indeed used aside in XML RFC v3 for notes: aside is "is a container for content that is semantically less important or tangential to the content that surrounds it." https://datatracker.ietf.org/doc/html/rfc7991#section-2.6 On the other hand, XML RFC v3 note is restricted to a single note after the abstract, giving information to reviewers: https://datatracker.ietf.org/doc/html/rfc7991#section-2.33
  • XML RFC v3 as of 3.5.13 only permits aside inside of dd and section (which means that what was reported as an error in your version of xml2rfc, /rfc/middle/section[10]/section[4]/dl/dd[1]/aside, is now correct. (It was not in the original XML2RFC in RFC 7991.)
  • However, this clearly means that aside is severely restricted in where it can occur in XML2RFC.
  • To address this, I am going to:
    • transform aside back to a t paragraph with "NOTE:" unless it is at the top level of a clause: I will not allow aside inside of different type of block, such as a table
    • not fold notes into preceding blocks, as is the default for Metanorma, even for definition lists; avoiding that kind of scenario is preferable.

@opoudjis
Copy link
Contributor

In fact, I already have code moving asides to after blocks they are embedded with; it was only applied to t figure table. I'm going to generalise that to everything but section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

4 participants