From: Adam R. <ad...@ex...> - 2010-12-21 19:52:53
|
The problem was in response:stream-binary(), this should now be fixed as revision 13429 in trunk. However there is also an error in your call to response:stream-binary(), response:stream-binary takes 3 arguments and not the two that you provided. 2010/12/21 Adam Retter <ad...@ex...>: > Okay so compression:zip used with response:stream-binary does seem to > be producing bad zip files, I am trying to trace the cause now... > > 2010/12/21 Adam Retter <ad...@ex...>: >> What is the error that you get? Please try and provide more >> information so that we can easily help you! >> >> 2010/12/21 Вячеслав Седов <sch...@gm...>: >>> well... maybe wrong use of stream-binary here? can it live without? >>> >>> xquery version "1.0"; >>> >>> let $xml := collection('/db/inbox/author') >>> let $xslt1 := doc('/db/xslt/xhtml2xml.xsl') >>> let $xslt2 := doc('/db/xslt/nested-para.xsl') >>> let $xsd := doc('/db/inbox/qa.xsd') >>> let $res := transform:transform(<root>{$xml}</root>, $xslt1, ()) >>> let $res := transform:transform(<root>{$res}</root>, $xslt2, ()) >>> let $archive := for $entry at $i in $res//документ return <entry >>> name="{$entry/@type}/{$i}.xml" type="xml" >>> method="deflate">{$entry}</entry> >>> return (response:set-header('Content-Disposition', 'attachment; >>> filename="author.zip"'), >>> response:set-header('Content-Type', 'application/octet-stream') , >>> response:stream-binary(compression:zip($archive, true()), >>> "application/octet-stream") ) >>> >>> 21 декабря 2010 г. 19:24 пользователь Adam Retter <ad...@ex...> написал: >>>> compression:zip() appears to work fine here with the latest trunk, >>>> perhaps you could provide a succinct repeatable test case >>>> demonstrating your issue? >>>> >>>> 2010/12/21 Вячеслав Седов <sch...@gm...>: >>>>> nope - compression:zip not work in my case (got latest trunk) >>>>> >>>>> also i note that compression:tar report errors like "request to write >>>>> '25336' bytes exceeds size in header of '0' bytes for entry '1.xml' " >>>>> >>>>> >>>>> 21 декабря 2010 г. 18:21 пользователь Adam Retter <ad...@ex...> написал: >>>>>> This should now work. Let me know if you have any problems... >>>>>> >>>>>> 2010/12/16 Adam Retter <ad...@ex...>: >>>>>>> Yes, I am looking at this at the moment, it seems its not just the >>>>>>> compression module, also the file module. >>>>>>> Neither of these modules have any tests :-( >>>>>>> >>>>>>> 2010/12/16 Вячеслав Седов <sch...@gm...>: >>>>>>>> no any error - just empty output >>>>>>>> >>>>>>>> what about include automated tests for compression module? since ODF & >>>>>>>> OOXML just zip files - compression module became vital for many >>>>>>>> applications >>>>>>>> >>>>>>>> with best wishes, >>>>>>>> Slav >>>>>>>> >>>>>>>> p.s. in near future i`ll try to find money for paid support or donations. >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Lotusphere 2011 >>>>>>>> Register now for Lotusphere 2011 and learn how >>>>>>>> to connect the dots, take your collaborative environment >>>>>>>> to the next level, and enter the era of Social Business. >>>>>>>> http://p.sf.net/sfu/lotusphere-d2d >>>>>>>> _______________________________________________ >>>>>>>> Exist-open mailing list >>>>>>>> Exi...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Adam Retter >>>>>>> >>>>>>> eXist Developer >>>>>>> { United Kingdom } >>>>>>> ad...@ex... >>>>>>> irc://irc.freenode.net/existdb >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Adam Retter >>>>>> >>>>>> eXist Developer >>>>>> { United Kingdom } >>>>>> ad...@ex... >>>>>> irc://irc.freenode.net/existdb >>>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Adam Retter >>>> >>>> eXist Developer >>>> { United Kingdom } >>>> ad...@ex... >>>> irc://irc.freenode.net/existdb >>>> >>> >> >> >> >> -- >> Adam Retter >> >> eXist Developer >> { United Kingdom } >> ad...@ex... >> irc://irc.freenode.net/existdb >> > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |