xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

Issue #470: Clarify p:unwrap for empty elements #471

Closed xatapult closed 3 years ago

ndw commented 3 years ago

There's no such thing as an "empty text node", perhaps:

<para>This step produces a single document; if the document element is unwrapped, the result might not be well-formed XML. If the document element is empty or contains a single text node child, the result will have the content type “<literal>text/plain</literal>”. If the document element is empty, the resulting document will be empty.</para>

xatapult commented 3 years ago

Now I'm getting confused. I thought we decided that unwrapping an empty element would produce:

Is this not correct?

gimsieke commented 3 years ago

No, as Norm said above and I said in #470, there is no such thing as an empty text node. As Norm suggested, when the unwrapped element doesn’t contain a node, the result will be an empty text document, that is, a document node with content-type=text/plain and no child nodes.

xatapult commented 3 years ago

All right, I'll try to reformulate

xatapult commented 3 years ago

Changed the last paragraph into a list and reformulated it a bit. Could you please check again?

gimsieke commented 3 years ago

Shouldn’t we change the sentence “All document properties are preserved” to “With the exception of the special cases where content-type is changed to text/plain and a possible serialization property is removed, all document properties are preserved.”? Otherwise Ok!

xatapult commented 3 years ago

@ndw Are you ok with Gerrit's suggestion?

ndw commented 3 years ago

I'm ok with Gerrit's suggestion.

xatapult commented 3 years ago

@ndw and/or @gimsieke I rephrased some sentences, to make it as clear as possible, so that even I can understand what's happening 😉

Would you mind checking again?