p:data with text/plain #154

Closed
alexmilowski opened this Issue May 11, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@alexmilowski

Starting with version 1.0.17, the following:

<p:data wrapper="c:query" href="query.xq" content-type="text/plain"/>

returns base64 encoded content instead of text:

<c:query xmlns:c="http://www.w3.org/ns/xproc-step" c:content-type="application/octet-stream" c:encoding="base64">ZGVjbGFyZSBuYW1lc3BhY2Ugcz0iaHR0cDovL3dlYXRoZXIubWlsb3dza2kuY29tL1YvQVBSUy8i...

@alexmilowski

This comment has been minimized.

Show comment
Hide comment
@alexmilowski

alexmilowski May 13, 2014

The pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"
   >

<p:output port="result" primary="true"/>

<p:identity>
<p:input port="source">
<p:data wrapper="c:data" content-type="text/plain" href="foo.xq"/>
</p:input>
</p:identity>

</p:declare-step>

The pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"
   >

<p:output port="result" primary="true"/>

<p:identity>
<p:input port="source">
<p:data wrapper="c:data" content-type="text/plain" href="foo.xq"/>
</p:input>
</p:identity>

</p:declare-step>
@alexmilowski

This comment has been minimized.

Show comment
Hide comment
@alexmilowski

alexmilowski May 13, 2014

The referenced file 'foo.xq':

element p { "hello world! }

The referenced file 'foo.xq':

element p { "hello world! }
@alexmilowski

This comment has been minimized.

Show comment
Hide comment
@alexmilowski

alexmilowski May 13, 2014

Expected output:

<c:data xmlns:c="http://www.w3.org/ns/xproc-step" content-type="text/plain">element p { "hello world! }
</c:data>

Expected output:

<c:data xmlns:c="http://www.w3.org/ns/xproc-step" content-type="text/plain">element p { "hello world! }
</c:data>
@alexmilowski

This comment has been minimized.

Show comment
Hide comment
@alexmilowski

alexmilowski May 13, 2014

The result in both 1.0.17-95 and 1.0.18-95:

<c:data xmlns:c="http://www.w3.org/ns/xproc-step" content-type="application/octet-stream" encoding="base64">ZWxlbWVudCBwIHsgImhlbGxvIHdvcmxkISB9Cg==
</c:data>

The result in both 1.0.17-95 and 1.0.18-95:

<c:data xmlns:c="http://www.w3.org/ns/xproc-step" content-type="application/octet-stream" encoding="base64">ZWxlbWVudCBwIHsgImhlbGxvIHdvcmxkISB9Cg==
</c:data>

@alexmilowski alexmilowski changed the title from c:data with text/plain to p:data with text/plain May 13, 2014

@phtyson

This comment has been minimized.

Show comment
Hide comment
@phtyson

phtyson Jul 28, 2014

I found that if the href value ends in '.txt' it will produce text/plain content; otherwise base64. Using 1.0.18-95.

phtyson commented Jul 28, 2014

I found that if the href value ends in '.txt' it will produce text/plain content; otherwise base64. Using 1.0.18-95.

@alexmilowski

This comment has been minimized.

Show comment
Hide comment
@alexmilowski

alexmilowski Aug 7, 2014

Huh. Extensions should not be used to guess the media type when I explicitly give the media type of the referenced URI.

Huh. Extensions should not be used to guess the media type when I explicitly give the media type of the referenced URI.

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Aug 15, 2014

Owner

I think this is fixed.

Owner

ndw commented Aug 15, 2014

I think this is fixed.

@ndw ndw added the test label Aug 18, 2014

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Aug 26, 2014

Owner

I believe this is fixed in XML Calabash 1.0.19, released today.

Owner

ndw commented Aug 26, 2014

I believe this is fixed in XML Calabash 1.0.19, released today.

@ndw ndw closed this Aug 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment