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

Preceding or trailing whitespace in p:inline #853

Closed
xml-project opened this issue Jul 25, 2019 · 2 comments

Comments

@xml-project
Copy link
Contributor

commented Jul 25, 2019

In the specs for p:inline we say:

Any preceding or following whitespace-only text nodes will be discarded.

I think the reference (preceding or following what) is ambiguous: Do we mean preceding/following the first none text node or do we mean before and after an element node (analogues to XML)?

@ndw

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

I think we meant only leading or trailing whitespace. But I also think this is a mistake. I think that we should say all content in p:inline is significant.

I think we should say that leading and trailing whitespace in an implicit inline is discarded.

So:

<p:with-input>
  <doc> text </doc>
</p:with-input>

creates an input document with a single node, doc containing text. But

<p:with-input>
  <p:inline>
    <doc> text </doc>
  </p:inline>
</p:with-input>

creates a document with three top-level nodes, initial whitespace, a doc element (containing text), and trailing whitespace.

If we strip whitespace out of p:inline, then there's no way to create a document that has leading whitespace.

@xml-project

This comment has been minimized.

Copy link
Contributor Author

commented Jul 27, 2019

👍

@ndw ndw self-assigned this Jul 27, 2019

@ndw ndw closed this in ff75621 Jul 28, 2019

ndw added a commit that referenced this issue Jul 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.