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

Avoid 'hybrid' elements #8

Open
obuchtala opened this issue May 11, 2017 · 0 comments
Open

Avoid 'hybrid' elements #8

obuchtala opened this issue May 11, 2017 · 0 comments

Comments

@obuchtala
Copy link
Member

obuchtala commented May 11, 2017

With hybrid elements we mean those nodes which can be used inline as well as
on block-level. Typically, this is due to one of the following reasons:

  1. A container element has 'mixed=true' to allow for simple text content

Example: it is allowed to write

  <td>123</td>

but also

  <td><p>123</p><p>456</p></td>

and unfortunately even

  <td>123<p>456</p></td>
  1. A structured element uses annotations as fields

Example: <element-citation>

  1. A text-node (mixed=true) allows for block-level children elements.

Example: <p> in JATS can contain other block-level elements such as <fig>.

Case 1. can not be solved by changing the schema, due to the lack of expressiveness of XSD. One strategy could be declaring these containers as hybrids explicitly,
but only allow either the content to be phrasing-content, or a sequence of block-level elements, but not mixed.
Alternatively, we are considering to normalise this by treating <td>123</td> as <td><p>123</p></td> internally, and dropping the extra wrapper on export.

Case 2 and 3 should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant