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

Stylesheets function cannot cope with remarks with @versionDate #556

Closed
martindholmes opened this issue Jun 19, 2022 · 1 comment
Closed
Labels
priority: high Relatively urgent; Council should revisit routinely. resp: StylesheetsGroup Issue is suitable for the group-learning approach taken in the Stylesheets Coop Working Group. type: bug A bug report.

Comments

@martindholmes
Copy link
Contributor

A current build-break is (I think) caused by this function from common/functions.xsl:

  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
    <desc>whether there is an out-of-date desc or gloss in the translation language</desc>
  </doc>
  <xsl:function name="tei:descOrGlossOutOfDate">
    <xsl:param name="context"/>
    <xsl:for-each select="$context">
      <xsl:variable name="lang" select="tei:generateDocumentationLang(.)[1]"/>
      <xsl:sequence select="tei:desc[@xml:lang='en']/@versionDate gt tei:desc[@xml:lang=$lang]/@versionDate
                         or tei:gloss[@xml:lang='en']/@versionDate gt tei:gloss[@xml:lang=$lang]/@versionDate"></xsl:sequence>
    </xsl:for-each>
  </xsl:function>

The issue is that @versionDate is now being added to <remarks>, and <remarks> are siblings of the <gloss>es and <desc>s for the context <*Spec> element, so (for instance) if you have both a <desc> and a <remarks> for the same language with @versionDate, then a sequence of two items will be retrieved by the function, and the attempt to compare the @versionDate values will generate an error.

I believe the solution is to have the function check the local-name() of the element as well as the @versionDate.

@martindholmes martindholmes added type: bug A bug report. priority: high Relatively urgent; Council should revisit routinely. resp: StylesheetsGroup Issue is suitable for the group-learning approach taken in the Stylesheets Coop Working Group. labels Jun 19, 2022
@martindholmes
Copy link
Contributor Author

Looks like I got this completely wrong! @hcayless fixed it with a tweak to the P5 sources. Closing.

@martinascholger martinascholger added this to the Release 7.54.0 milestone Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Relatively urgent; Council should revisit routinely. resp: StylesheetsGroup Issue is suitable for the group-learning approach taken in the Stylesheets Coop Working Group. type: bug A bug report.
Projects
None yet
Development

No branches or pull requests

2 participants