Re: [djatoka-devel] problems using djatoka Viewer v2.0 with Cocoon
Status: Beta
Brought to you by:
rchute
From: Clifford W. <cwulfman@Princeton.EDU> - 2009-05-26 16:43:38
|
Ryan et al, I hadn't used Firebug before (and I'm rather naive about Javascript at this point), but after installing it and poking around a bit, I think I've at least discovered where the (one?) error is occurring. On mootools-1.2-core.js, line 3403: this.xhr.open(method.toUpperCase(), url, this.options.async); when url is set to "http://lib-staff900.princeton.edu:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http://diglib.princeton.edu/assets/images/deliverable/pudl0026/ga200801130/00000001.jpf&svc_id=info:lanl-repo/svc/getMetadata " executing the line produces the following Security Error: Security Error: Content at http://localhost:8080/exist/test/view?link=http://diglib.princeton.edu/assets/images/deliverable/pudl0026/ga200801130/00000001.jpf may not load data from http://lib-staff900.princeton.edu:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http://diglib.princeton.edu/assets/images/deliverable/pudl0026/ga200801130/00000001.jpf&svc_id=info:lanl-repo/svc/getMetadata . Access to restricted URI denied" code: "1012 [Break on this error] this.xhr.open(method.toUpperCase(), url, this.options.async); The url is valid enough; fetched outside the cocoon context it returns this: { "identifier": "http://diglib.princeton.edu/assets/images/deliverable/pudl0026/ga200801130/00000001.jpf ", "imagefile": "/usr/local/tomcat/temp/ cache-180919778110344494195283072.jpf", "width": "2880", "height": "1934", "dwtLevels": "5", "levels": "5", "compositingLayerCount": "1" } So: any idea why my URL is not allowed to load this? I confess to not knowing enough Cocoon to make much progress here. Thanks in advance for any help, -Cliff On May 21, 2009, at 7:38 PM, Ryan M. Chute wrote: > Hi Cliff, > > Are you using Firebug? That lets you know if some of the GET > requests are > returned 404. I'd try that, the problem is probably some kind of > relative > path or file resolution issue. > > Let us know, > Ryan > >> I'm trying to serve up viewer pages through Cocoon but am having >> problems. In the following pipeline >> >> <map:match pattern="view"> >> <map:generate src="xq/echo.xq" type="xquery"/> >> <map:transform src="xsl/adoreview.xsl"/> >> <map:serialize encoding="UTF-8" type="xhtml"/> >> </map:match> >> >> the Xquery returns the URL for a jpf; adoreview.xsl creates a file >> like the following (basically the demo viewer page included with >> djatoka Viewer): >> >> <?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE html >> PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" >> "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd >> "> >> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> >> <head> >> <meta name="author" content="Ruven Pillay >> <ru...@us...m >> >"/> >> <meta name="author" content="Ryan Chute >> <rc...@us...m >> >"/> >> <meta name="keywords" >> content="djatoka IIPImage Ajax IIP Zooming Streaming High >> Resolution Mootools"/> >> <meta name="description" >> content="djatoka IIPImage Viewer: High Resolution Remote >> Image Streaming Viewing"/> >> <link rel="stylesheet" type="text/css" media="all" href="css/ >> iip.compressed.css"/> >> <link rel="shortcut icon" href="images/djatoka.16x16.png"/> >> <title>djatoka Viewer, based on IIPMooViewer 1.1</title> >> <script type="text/javascript" src="javascript/mootools-1.2- >> core-compressed.js"/> >> <script type="text/javascript" src="javascript/mootools-1.2- >> more-compressed.js"/> >> <script type="text/javascript" src="javascript/ >> iipmooviewer-1.1.js"/> >> <script type="text/javascript"> >> // The iipsrv server path >> var server = >> 'http://lib-staff900.princeton.edu:8080/adore-djatoka/resolver' >> ; >> >> var images = >> 'http://diglib.princeton.edu/assets/images/deliverable/pudl0026/ga200801137/00000001.jpf' >> >> // Copyright or information message >> var credit = ''; >> >> // Create our viewer object - note: must assign this to the >> 'iip' variable. >> // See documentation for more details of options >> iip = new IIP( "targetframe", { >> image: images, >> server: server, >> credit: credit, >> zoom: 1, >> render: 'random', >> showNavButtons: true >> }); >> </script> >> </head> >> <body> >> <div style="width:99%;height:99%;margin-left:auto;margin- >> right:auto" >> id="targetframe"/> >> </body> >> </html> >> >> When served through Cocoon, the image and the controller don't >> display; if this file is saved out and opened as a stand-alone web >> page, they do. >> >> Has anyone had any success getting this to work? >> >> --Cliff >> >> >> Dr. Clifford E. Wulfman >> Coordinator of Library Digital Initiatives >> Princeton University Library >> cwulfman@Princeton.EDU >> >> >> ------------------------------------------------------------------------------ >> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >> is a gathering of tech-side developers & brand creativity >> professionals. >> Meet >> the minds behind Google Creative Lab, Visual Complexity, >> Processing, & >> iPhoneDevCamp asthey present alongside digital heavyweights like >> Barbarian >> Group, R/GA, & Big Spaceship. http://www.creativitycat.com >> _______________________________________________ >> djatoka-devel mailing list >> dja...@li... >> https://lists.sourceforge.net/lists/listinfo/djatoka-devel >> > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity > professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp asthey present alongside digital heavyweights like > Barbarian > Group, R/GA, & Big Spaceship. http://www.creativitycat.com > _______________________________________________ > djatoka-devel mailing list > dja...@li... > https://lists.sourceforge.net/lists/listinfo/djatoka-devel Dr. Clifford E. Wulfman Coordinator of Library Digital Initiatives Princeton University Library cwulfman@Princeton.EDU |