Menu

#171 Stylesheets: @xml:lang on div[type='textpart'] not handled

9.1
done
None
5(medium)
2019-10-22
2017-12-21
No

The @xml:lang attribute on div[@type='textpart'] elements are not handled by the stylesheet.
The html

comes from the stylesheet: 'htm-teiab.xsl'

Proposed solution:

  • add a call to the named template to 'htm-teiab.xsl"
<xsl:template match="t:ab">
      <xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
      <xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
      <div class="textpart">
          <!-- Found in htm-tpl-lang.xsl -->
          <xsl:call-template name="attr-lang"/>
          <span class="ab">
          (...)
  • add a comment in 'htm-teidiv.xsl" to indicate the role of 'htm-teiab.xsl'
<xsl:template match="t:div">
    <!-- div[@type = 'edition']" and div[@type='textpart'] can be found in htm-teidivedition.xsl. See also htm-teiab.xsl for the html element div[@class='textpart']  -->

Discussion

  • BODARD Gabriel

    BODARD Gabriel - 2018-03-13
    • status: unread --> accepted
     
  • BODARD Gabriel

    BODARD Gabriel - 2018-03-13

    This seems reasonably to me. Do you want to go ahead and fix it, Emmanuelle (testing for non-regression against other work in the meantime, of course)?

     
  • Emmanuelle Morlock

    Yes Gabby, I'd be glad to do it. Concerning the testing for nun-regression against other work, I might take advantage of some guidance (I don't have as many different XML EpiDoc datasets in my work). What would you advice?

     
  • BODARD Gabriel

    BODARD Gabriel - 2019-01-22

    What I usually do is put up a dev version of the (a) guidelines, and (b) xslt, and ask either EDAG or Markup to check the first for errors, and probably Markup to test the xslt again large numbers of their texts, looking out in particular for errors in inscriptions that have textparts. The test suite (disucssed elsewhere) may or may not be helpful for this process as well.

     
  • BODARD Gabriel

    BODARD Gabriel - 2019-01-24
    • Group: future --> 9.1
     
  • Emmanuelle Morlock

    The test suite uses some html resulting files for the comparison. So each new developement in the XSLT resulting in changes in the html shoud be updated.
    * Idea from Gabby (2019-01-30), email conversation with J. Nourish and EMo :

    rather than a bunch of random and hopefully representative EpiDoc files, we should hand-curate one or a small number of artificial files that exemplify all of the features we want to test against regression for (things like square brackets handling are the potentially most fragile), so that each new development can be tested to make sure it doesn't break existing code before being pushed. This doesn't necessarily have to be carried out by every single developer, but it should then at the least be used by whoever accepts the pull request…

     
  • Emmanuelle Morlock

    added pull request to github
    https://github.com/EpiDoc/Stylesheets/pull/1

    The modification just adds a call to the templateattr-lang that takes theab/@xml:lang and transfers it to the html div[@class='texpart'].
    The stylesheet doesn't take into account any attribute on div[@type='texpart']. I hadn't got at first that the GL says that there is only one ab per div.

        <!-- a div[@type='textpart'] is created for each ab element, independant of the textpart / ab hierarchical structure -->
        <xsl:if test="@xml:lang">
            <!-- Found in htm-tpl-lang.xsl -->
            <xsl:call-template name="attr-lang"/>
        </xsl:if>
    
     
  • Scott Vanderbilt

    • Group: 9.1 --> future
     
  • Scott Vanderbilt

    Bump -> Future

     
  • BODARD Gabriel

    BODARD Gabriel - 2019-10-22

    Actually, I thought this one was fixed already, and the pull request above accepted into the EpiDoc repo? Pinging @gethia for confirmation of this? (This is a simple bug-check, so doesn't need to interrupt the current testing period.)

     
  • Emmanuelle Morlock

    You're right: the pull request was merged on 21 of August. See https://github.com/EpiDoc/Stylesheets/pull/1

     
  • Emmanuelle Morlock

    • Group: future --> 9.1
     
  • Emmanuelle Morlock

    I put it on 9.1 but I'm not sure it was the right thing to do... shall I close it or will it be done automatically with the release?

     
  • BODARD Gabriel

    BODARD Gabriel - 2019-10-22

    9.1 is correct. I would mark it as done, so it will be documented as such in the release notes.

     
  • Emmanuelle Morlock

    • status: accepted --> done
     

Log in to post a comment.