|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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>
|
|
#3
|
||||
|
||||
|
Not 100% on this - but don't you have to wrap the code in a <box> element?
__________________
~ Joe Penn |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Accessing RDFs on web server from client |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|