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

Apply space attribute more generically to multiple structure elements #61

Closed
proycon opened this issue Nov 26, 2018 · 1 comment
Closed
Assignees
Labels
enhancement ready Implemented but not released yet
Milestone

Comments

@proycon
Copy link
Owner

proycon commented Nov 26, 2018

As found by @kosloot; the following text is currently inconsistent because TEXTDELIMITER for part is empty and explicit leading/trailing spaces will be normalised away. We need a mechanism to override the default TEXTDELIMITER in some instances. Perhaps by generically allowing the "space" attribute (like on <w>).

<FoLiA xmlns="http://ilk.uvt.nl/folia" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="test" version="1.5" >
  <metadata>
      <annotations>
      </annotations>
  </metadata>
  <text xml:id="t1">
    <p xml:id="p1">
      <t>Een test</t>
      <part xml:id="part1">
        <t>Een</t>
      </part>
      <part xml:id="part2">
        <t>test</t>
      </part>
    </p>
  </text>
</FoLiA>
@proycon proycon added this to the v2.0 milestone Nov 26, 2018
@proycon proycon added the to do staged to be worked on label Dec 19, 2018
@proycon proycon added in progress and removed to do staged to be worked on labels Feb 27, 2019
proycon added a commit to proycon/foliapy that referenced this issue Feb 27, 2019
@proycon proycon added enhancement ready Implemented but not released yet and removed in progress labels Feb 28, 2019
@proycon proycon closed this as completed Mar 13, 2019
@proycon proycon reopened this Jul 18, 2019
proycon added a commit that referenced this issue Jul 18, 2019
proycon added a commit that referenced this issue Jul 18, 2019
@proycon proycon modified the milestones: v2.0, v2.2 Jul 18, 2019
@proycon
Copy link
Owner Author

proycon commented Jul 18, 2019

Ok, this was not entirely correct yet. It is now fixed.

  • <part> by default has a space as a text delimiter (instead of None), this makes the initial example in this post VALID. So instead of overriding the default textdelimiter for part, we changed the default.
  • space="no" may be set on <part> and almost any other structure element to undo (override) their default text delimiter, making it glue directly to the structural predecessor.
  • Some structural elements such as <br> and <whitespace> have an empty textdelimiter (note that "" != None) by definition, those can never be made 'spacing' (because that would be non-sensible anyway).

@proycon proycon closed this as completed Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ready Implemented but not released yet
Projects
None yet
Development

No branches or pull requests

2 participants