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

Unable to properly delete a <constraintSpec> #541

Closed
sydb opened this issue Jan 22, 2022 · 4 comments · Fixed by #545
Closed

Unable to properly delete a <constraintSpec> #541

sydb opened this issue Jan 22, 2022 · 4 comments · Fixed by #545
Assignees
Labels
type: bug A bug report.

Comments

@sydb
Copy link
Member

sydb commented Jan 22, 2022

One would think this would be easy. Just <constraintSpec module="[module]" ident="[ident]" sceme="schematron" mode="delete"/> should do it, eh? A bit weird that @scheme is required, but no big deal.

No such luck. The big deal is that it does not work. Nor does most any other method I tried. According to my little test ODD (which is attached to this ticket with an extra .txt extension), one can delete a <constraintSpec> from a class by specifying the deletion or change (to an empty <constraintSpec> or <constraint>) in a <classSpec mode="change">; and one can delete a <constraintSpec> from an element only if "replace"ed with an empty one.

I do not think this is the right state of affairs. I think that the whole point of being in att.identifiable is to be deleted or over-ridden.

@sydb sydb added the type: bug A bug report. label Jan 22, 2022
@sydb sydb added this to the Release 7.53.0 milestone Jan 22, 2022
@martindholmes
Copy link
Contributor

With @sydb @HelenaSabel and @npcole : We found that if we change line 2018 or odd2odd.xsl from:

<xsl:for-each select="tei:constraintSpec">

to:

<xsl:for-each select="descendant::tei:constraintSpec">

we get a change in behaviour -- processing does find the constraintSpecs -- but the original problem is not solved by this alone.

@sydb
Copy link
Member Author

sydb commented Jan 28, 2022

We (the Stylesheets group) have just discovered the problem (thanks to @HelenaSabel :-) — the key ../@ident||'_'||@ident does the wrong thing in some cases.
So our proposed solution is to just use @ident instead. There are a few cases where this will fail, because we have used the same identifier on two or more <constraintSpec>s:

      5 abstractModel-structure-l
      3 spanTo
      3 spanTo_fr
      2 abstractModel-structure-p

So we suggest those 13 just get re-named, so we can use just @ident. This solution also requires that users always use unique constraintSpec/@ident, so probably a <constraintSpec> to enforce that is a good idea!

@HelenaSabel HelenaSabel added the status: blocked Issue cannot be fixed until another issue is fixed (put that issue # in the comments). label Jan 28, 2022
@HelenaSabel
Copy link
Member

Blocked until the discussion on TEI ticket 2223 is closed.

@sydb
Copy link
Member Author

sydb commented Jan 28, 2022

See TEI issue 2223 and the corresponding PR.

Hmmm … is it better to write that as

See /TEIC/TEI/issues/2223 and the corresponding PR, /TEIC/TEI/pull/2224.

? The former looks nicer, but the latter gives you pop-ups.

@HelenaSabel HelenaSabel removed the status: blocked Issue cannot be fixed until another issue is fixed (put that issue # in the comments). label Feb 15, 2022
@peterstadler peterstadler linked a pull request Jul 22, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A bug report.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants