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

Question about ab-delete-020.xml #236

Closed
ndw opened this issue Jul 24, 2019 · 2 comments

Comments

@ndw
Copy link
Contributor

commented Jul 24, 2019

Why is the content type expected to be text/plain?

Why is the serialization key not expected to be in the map?

I get:

<c:document-properties xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <base-uri>http://base</base-uri>
  <content-type>application/xml</content-type>
  <serialization map="true"/>
  <bonus-prop>prop</bonus-prop>
</c:document-properties>

which looks like a correct result to me.

@xml-project

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

Sorry, but I tend to disagree: As the p:delete deletes the element element from the source document, the result is a single text node, wrapped in a document node. Therefor the result is a text document with content-type text/plain and no document property is preserved.
Background: The specs on p:delete say:

If the resulting document contains exactly one text node, the content-type property is changed to text/plain and the serialization property is removed, while all other document properties are preserved.

What did I miss?

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

Fair catch. It's possible I'm not handling that correctly in p:delete.

@ndw ndw closed this Jul 24, 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.