OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

search-ws message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [search-ws] [Issue] Search response can only return XML records


Matthew J. Dovey wrote:
Currently a record within a Response can only contain an XML record.
There is no support for non-XML records.
    

This isn't true. The recordData element can contain any XML structure.
Whilst the immediate content must be an XML element, what happens
underneath that is entirely dependent on the definition of the XML
namespace of that element. It is therefore quite easy to return binary
data using any mechanism you like.
  

Hi Mathew,

So we agree then that recordData element can contain a XML structure.
That was my point. Indeed an XMl structure can contain binary content
but that would be left to the application schema under current strawman
spec.

What I was proposing is for spec to define a type hierarchy for a record such that
Binary records may easily be returned by server without requiring any help from
application XML schema. See an abstract example below:

Record Type Hierarchy

Now assume that a server may return a BinaryRecord or an XMLRecord wherever it current returns a Record. Above requires adding a couple of types to our schema but then we no longer relegate handling of binary results to application specific schemas.

Thanks.

For instance


<record>
  <recordSchema> http://example.org/stuff</recordSchema>
  <recordPacking>xml</recordPacking>
  <recordData>
    <m:data xmlns:m='http://example.org/stuff'>
      <m:photo xmlmime:contentType='image/png'>/aWKKapGGyQ=</m:photo>
      <m:sig
xmlmime:contentType='application/pkcs7-signature'>Faa7vROi2VQ=</m:sig>
    </m:data>
  </recordData>
  <recordPosition>1</recordPosition>
</record>

or

<record>
  <recordSchema>http://example.org/stuff</recordSchema>
  <recordPacking>xml</recordPacking>
  <recordData>
    <m:photo xmlns:m='http://example.org/stuff'
xmlmime:contentType='image/png'>/aWKKapGGyQ=</m:photo>
  </recordData>
  <recordPosition>1</recordPosition>
</record>

Or even

<record>
  <recordSchema>http://example.org/stuff</recordSchema>
  <recordPacking>xml</recordPacking>
  <recordData>
    <m:photo
xmlns:m='http://example.org/stuff'>http://myserver.com/myphoto.png</m:ph
oto>
  </recordData>
  <recordPosition>1</recordPosition>
</record>


It would be fairly simple to apply XOP to the above if this was thought
necessary e.g. (modified from the example at
http://www.w3.org/TR/xop10/)

MIME-Version: 1.0
Content-Type: Multipart/Related;boundary=MIME_boundary;
    type="application/xop+xml";
    start="<mymessage.xml@example.org>";
    start-info="text/xml"
Content-Description: An SRU GET response with XOP and binary data

--MIME_boundary
Content-Type: application/xop+xml; 
    charset=UTF-8; 
    type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <mymessage.xml@example.org>

<record>
  <recordSchema> http://example.org/stuff</recordSchema>
  <recordPacking>xml</recordPacking>
  <recordData>
    <m:data xmlns:m='http://example.org/stuff'>
      <m:photo><xop:Include 
      xmlns:xop='http://www.w3.org/2004/08/xop/include' 
      href='cid:http://example.org/me.png'/></m:photo>
      <m:sig><xop:Include 
      xmlns:xop='http://www.w3.org/2004/08/xop/include' 
      href='cid:http://example.org/my.hsh'/></m:sig>
    </m:data>
  </recordData>
  <recordPosition>1</recordPosition>
</record>

--MIME_boundary
Content-Type: image/png
Content-Transfer-Encoding: binary
Content-ID: <http://example.org/me.png>

// binary octets for png

--MIME_boundary
Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: binary
Content-ID: <http://example.org/my.hsh>

// binary octets for signature

--MIME_boundary--

---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  You may a link to this group and all your TCs in OASIS
at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php 

  


-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]