Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
E
Editoria Typescript
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XSweet
  • Editoria Typescript
  • Issues
  • #41

Closed
Open
Created Oct 29, 2020 by Alex Theg@athegOwner

Import tables for Wax 2

Wax 2 supports tables. The differences between what the XSweet pipeline currently produces and the format Wax 2 uses is not big:

  • XSweet's <td>s have a style attribute; Wax does not
  • XSweet's <p>s do not have a class but Wax's do
  • XSweet doesn't wrap the table in a <tbody> tag; Wax does

XSweet output:

<table>
  <tr>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>One</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Two</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Three</p>
    </td>
  </tr>
  <tr>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Four</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Five</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Six</p>
    </td>
  </tr>
  <tr>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Seven</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Eight</p>
    </td>
    <td style="border-bottom-style: solid; border-bottom-width: 0.5pt; border-left-style: solid; border-left-width: 0.5pt; border-right-style: solid; border-right-width: 0.5pt; border-top-style: solid; border-top-width: 0.5pt; vertical-align: top">
      <p>Nine</p>
    </td>
  </tr>
</table>

Wax 2 table:

<table>
  <tbody>
    <tr>
      <td>
        <p class="paragraph">one</p>
      </td>
      <td>
        <p class="paragraph">two</p>
      </td>
      <td>
        <p class="paragraph">three</p>
      </td>
    </tr>
    <tr>
      <td>
        <p class="paragraph">four</p>
      </td>
      <td>
        <p class="paragraph">five</p>
      </td>
      <td>
        <p class="paragraph">six</p>
      </td>
    </tr>
    <tr>
      <td>
        <p class="paragraph">seven</p>
      </td>
      <td>
        <p class="paragraph">eight</p>
      </td>
      <td>
        <p class="paragraph">ten</p>
      </td>
    </tr>
  </tbody>
</table>

When an XSweet table like the first example is passed in, Wax appears to gloss over the differences seamlessly, adding class attributes and a body tag, and dropping the style information entirely. That is great news.

To complete table import into Wax 2, the only change need (that I can identify) is to pass tables through the final editoria-reduce.xsl step. Currently, that drops all table tags, leaving cell contents unchanged.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None