XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 13th, 2003, 11:05 AM
Virus Virus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 4 Virus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Virus
Question Accessing RDFs on web server from client

I am working on a project that needs to access lists of info that will be dynamically generated on a remote web server. I figured that RDFs would be the best way to do this. I have tested the RDFs locally and ran them through the W3C RDF validator. So they are working properly. Once I use a URL in the datasource attribute, I get a blank tree displayed.

Here is a link to one of the RDFs.
URL

I don't have a copy of the XUL code with me. I will post it once I get home from work.

Reply With Quote
  #2  
Old January 13th, 2003, 12:40 PM
Virus Virus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 4 Virus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Virus
Here is the xul code

Code:
<?xml version="1.0"?>
<?xml-stylesheet href="remoterdf.css" type="text/css"?>

<window
    id        = "remoterdf-main-window"
    title     = "remote RDF test"
    xmlns     = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    width     = "800"
    height    = "600"
    orient    = "vertical"
    persist   = "screenX screenY width height sizemode">

  <tree flex="1" datasources="http://www.piaxis.com/dvdlist.rdf" ref="urn:dvd:data">
    <treecols>
      <treecol id="dvd-name" label="Genre/Title" primary="true" flex="3"/>
      <treecol id="dvd-rating" label="Rating" flex="1"/>
      <treecol id="dvd-length" label="Length" flex="1"/>
      <treecol id="dvd-year" label="Year" flex="1"/>
      <treecol id="dvd-std" label="Standard Screen" flex="1"/>
      <treecol id="dvd-wide" label="Wide Screen" flex="1"/>
      <treecol id="dvd-ac3" label="Dolby Digital" flex="1"/>
      <treecol id="dvd-dts" label="DTS Surround" flex="1"/>
      <treecol id="dvd-superbit" label="Superbit" flex="1"/>
      <treecol id="dvd-number" label="Number" flex="1"/>
    </treecols>

    <template>
        <rule>
          <treechildren>
            <treeitem uri="rdf:*">
              <treerow>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
                <treecell label="rdf:URL"/>
              </treerow>
            </treeitem>
          </treechildren>
        </rule>
    </template>
  </tree>
</window>

Reply With Quote
  #3  
Old January 16th, 2003, 06:50 AM
jpenn's Avatar
jpenn jpenn is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2002
Location: Washington, DC
Posts: 2,693 jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 41 m 10 sec
Reputation Power: 16
Not 100% on this - but don't you have to wrap the code in a <box> element?
__________________
~ Joe Penn

Reply With Quote
  #4  
Old January 16th, 2003, 10:36 AM
Virus Virus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 4 Virus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Virus
You should not need a box around everything.

After doing some more searching I have found three things that are preventing this from working.

First, you need to add this line to allow the browser to access files outside of the project.
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');

Second, you need to have the remote RDF file signed or you need to turn off some browser security by modifying the prefs.js (or user.js).

The third problem is that the tree may need to be refreshed after it has finished loading.


I don't know if I will be able to get around the second problem. I may just interface directly with the pgsql stored procedures using XPCOM to get my data.

Because of the problems, I have put that project on hold and have started working on one that only needs to access local RDFs.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Accessing RDFs on web server from client


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway