From: Dan M. <dan...@gm...> - 2012-01-30 13:45:53
|
Hello Lyle, Glad to see people using eXist for Adobe forms. This is an interesting approach. You "should" be able to customize the serialization for any mime-type. You might want to try a few small steps. Have you tried to create a simple custom XQuery program that adds the serialize option? Have you tried putting a controller.xql directly in a collection? For example /db/xfdf/controller.xql There is some additional information in this here: http://en.wikibooks.org/wiki/XQuery/URL_Rewriting_Basics Make sure you edit the controller-config.xml file and restart the server. Let us know how this goes. Once you get it set up we might want to add a Wikibook article on this topic. - Dan On Tue, Jan 24, 2012 at 4:25 AM, Lyle Winton <Lyl...@vu...> wrote: > Hi, > > I’m an eXist noob and can’t find this in docs or mail archive. I’m using > eXist to store Adobe PDF form data (XFDF) which is working well after > updating the mime-types.xml . However, extracting the documents (via a > browser GET on a rest URL) returns output without an XML declaration, and > Adobe Acrobat then warns users the file is corrupt. For example the admin > tools in Browse Collections eventually generates a link to the following > indexed document... > > > http://localhost:8080/exist/rest//db/rdmp-forms-test/20120120%2520RDMP%2520test4_data.xfdf<http://localhost:8080/exist/rest/db/rdmp-forms-test/20120120%2520RDMP%2520test4_data.xfdf> > > > > I’m aware of the XQuery "declare option exist:serialize" for queries, but > is there a way I can set omit-xml-declaration=no to the gobal default or > just for specific mime types? > > > > I’ve tried editing webapp/controller.xql adding a new dispatch/forward... > > else if (ends-with($exist:resource, '.xfdf')) then > > ...with a set-attribute omit to no, but I suspect REST calls are getting > caught before this as it didn’t matter what I put here. I’ve also tried > playing with serializer config but this didn’t change the REST output. > > > > Can someone give me a hint where to look? > > > > Many thanks in advance, > > Lyle. > > > > This email, including any attachment, is intended solely for the use of > the intended recipient. It is confidential and may contain personal > information or be subject to legal professional privilege. If you are not > the intended recipient any use, disclosure, reproduction or storage of it > is unauthorised. If you have received this email in error, please advise > the sender via return email and delete it from your system immediately. > Victoria University does not warrant that this email is free from viruses > or defects and accepts no liability for any damage caused by such viruses > or defects. > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Dan McCreary Semantic Solutions Architect office: (952) 931-9198 cell: (612) 986-1552 |