- From: Norman Walsh <ndw@nwalsh.com>
- Date: Thu, 07 Sep 2017 08:48:05 -0500
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <87shfytyay.fsf@nwalsh.com>
Hi all,
When we moved towards supporting non-XML documents natively, we
decided that p:data wasn’t necessary anymore. The idea being that
p:document could load XML or non-XML documents.
I wonder if that’s true. If we can determine the media type from the
filename, I suppose we could use that, but that raises two problems:
what if the media type is unknown and what if the author knows they
want to load a .bin file as XML?
In other words, what does this mean:
<p:document href="pipe.xpl"/>
Do we try to load that as XML and fall back to non-XML if the parse
fails? What if it’s supposed to be XML and is not well-formed?
I begin to suspect that p:data is actually useful for authors. It
allows them to express “load this as binary” while p:document allows
them to express “load this as XML”.
We could keep a single element and allow them to make this distinction
with an attribute (a content-type attribute, for example), or document
properties:
<p:document href="pipe.xpl"
document-properties="{ map {{ 'content-type': 'image/png' }} }”/>
but that’s a lot more typing.
Be seeing you,
norm
P.S. Separate email coming in a moment about the awkwardness of that
document-properties AVT.
--
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com
Received on Thursday, 7 September 2017 13:48:35 UTC