cancel
Showing results for 
Search instead for 
Did you mean: 

Make RDF file (FF extension) ?

jayjayecl
Confirmed Champ
Confirmed Champ
Hi, I'm trying to build a Firefox Extension (aiming at Knowledge management using Alfresco).
As I'm a totally newbie to it, I threw a look at a couple of tutorials.

Here is the step I cannot go through.
I'm trying to have a simple menubox in Firefox, where each listitem would be a space inside my Company_Home.
Then, I "remixed" the sample webscript "folder", in order to get a "RDF" result, which looks like :
 
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

         xmlns:folders="http://alfresco.smileVT.ext/folders-rdf#">

   <rdf:Seq about="http://alfresco.smileVT.ext/folders">
<rdf:li>
         <rdf:Description about="http://alfresco.smileVT.ext/folders/0">
         <folders:lname>Data Dictionary</folders:lname>
         </rdf:Description>
</rdf:li>
<rdf:li>
         <rdf:Description about="http://alfresco.smileVT.ext/folders/1">
         <folders:lname>Guest Home</folders:lname>
         </rdf:Description>
</rdf:li>
<rdf:li>
         <rdf:Description about="http://alfresco.smileVT.ext/folders/2">
         <folders:lname>User Homes</folders:lname>
         </rdf:Description>
</rdf:li>
<rdf:li>
         <rdf:Description about="http://alfresco.smileVT.ext/folders/3">
         <folders:lname>Sites</folders:lname>
         </rdf:Description>
</rdf:li>
<rdf:li>
         <rdf:Description about="http://alfresco.smileVT.ext/folders/4">
         <folders:lname>Espace Test</folders:lname>
         </rdf:Description>
</rdf:li>
</rdf:Seq>
</rdf:RDF>

This is the source of the page when I call my webscript "localhost:8080/alfresco/service/sample/customfolder/Company%20Home?guest=true"

The problem is I cannot define this URL to be the "datasource" property of my XUL file in the following :
<button type="menu" label="Folders" datasources="localhost:8080/alfresco/service/sample/customfolder/Company%20Home?guest=true" 
            ref="http://alfresco.smileVT.ext/folders">
            <template>
              <menupopup>
                <menuitem uri="rdf:*" label="rdf:http://alfresco.smileVT.ext/folders-rdf#lname"
                    oncommand="Helloworld.onClick(event);"/>               
              </menupopup>
            </template>
        </button>

It just does not work.
However, If I copy the RDF source into a local file and change the datasource to match this very local file, as in the following, it perfectly works


<button type="menu" label="Folders" datasources="chrome://sample/content/alfresco_test.rdf" 
            ref="http://alfresco.smileVT.ext/folders">
            <template>
              <menupopup>
                <menuitem uri="rdf:*" label="rdf:http://alfresco.smileVT.ext/folders-rdf#lname"
                    oncommand="Helloworld.onClick(event);"/>               
              </menupopup>
            </template>
        </button>

Has anyone achieved to do what I'm trying to ?

Thank you all
3 REPLIES 3

jayjayecl
Confirmed Champ
Confirmed Champ
U^p

Has anyone any idea about that ?

mikeh
Star Contributor
Star Contributor
I suspect you'd get a better response from some Firefox forums, but have you tried inserting "http://" in front of the URL?

Mike

jayjayecl
Confirmed Champ
Confirmed Champ
Yes I tried. I think that I even didn't try without "http"… I must have made a mistake with the copy-paste in the forum.
In fact, I dont think FF forums would be able to help me.

I think that calling my REST URL should lead to a popup saying "Do you ant to download this file 'blabla.rdf' ", and not displaying a XML file in a web browser. Do you see what I mean ?