- From: Adam Retter <adam@exist-db.org>
- Date: Thu, 22 Jun 2017 18:10:50 -0400
- To: Jirka Kosek <jirka@kosek.cz>
- Cc: Michael Kay <mike@saxonica.com>, Adam Retter <adam.retter@googlemail.com>, EXPath ML <public-expath@w3.org>
- Message-ID: <CAJKLP9av0ibRN5xSqzBBifb=nAcZF5vYvNkwrzBuDEhvWV6Opg@mail.gmail.com>
Thanks to everyone for their replies. I have managed to implement this now in a streaming manner by carrying a appropriate error code with the lazily evaluated binary stream, so that if an IOException occurs, we can pass through the correct XPath/XQuery error code. On 11 June 2017 at 09:10, Jirka Kosek <jirka@kosek.cz> wrote: > On 7.6.2017 17:34, Michael Kay wrote: > > But I think my approach here would be different. I would support the > bin:part#3 function as specified, albeit inefficiently, and offer a > different function perhaps bin:read-up-to($in, $start, $len) which reads > from $start to the end of $in or to $len whichever comes first. > > +1 > > As there are two different use-cases -- "read exactly N bytes" and "read > as much as possible" I would also prefer not change existing function > behaviour and introduce new function as Mike suggested. > > Jirka > > -- > ------------------------------------------------------------------ > Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz > ------------------------------------------------------------------ > Professional XML and Web consulting and training services > DocBook/DITA customization, custom XSLT/XSL-FO document processing > ------------------------------------------------------------------ > OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep. > ------------------------------------------------------------------ > Bringing you XML Prague conference http://xmlprague.cz > ------------------------------------------------------------------ > > -- Adam Retter eXist Developer { United Kingdom } adam@exist-db.org irc://irc.freenode.net/existdb
Received on Thursday, 22 June 2017 22:11:24 UTC