AKSW / RDFauthor

RDFauthor creates formular widgets out of RDFa-enhanced webpages.
http://aksw.org/Projects/RDFauthor
GNU General Public License v3.0
18 stars 5 forks source link

resource selector should not create URLs with spaces #15

Closed seebi closed 11 years ago

seebi commented 11 years ago

please see https://github.com/AKSW/OntoWiki/issues/144

frodeseverin commented 11 years ago

Or other invalid characters for an URL for that matter.

seebi commented 11 years ago

@cannelony : There should be a URI encoding function in javascript, right?

seebi commented 11 years ago

http://www.w3schools.com/jsref/jsref_encodeuri.asp

cannelony commented 11 years ago

http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp

frodeseverin commented 11 years ago

Thank you for looking into this issue.

However, this was but a partial fix. Have a look at http://data.bbib.no/view/r/Nordahl_Grieg for a demonstration.

The source for the resource is correct now, although not very readable. Readability is an Erfurt issue, and I will report it there.

<Nordahl_Grieg> <frbr:creatorOf> <Til_Ungdommen> ;
                frbr:creatorOf <http://data.bbib.no/data/17._mai_1914>, <http://data.bbib.no/data/Ung%20m%C3%A5%20verden%20ennu%20v%C3%A6re>, <http://data.bbib.no/data/Ung%20m%C3%A5%20verden%20ennu%20v%C3%A6re%20%3A%20roman>, <http://data.bbib.no/data/V%C3%A5r%20%C3%A6re%20og%20v%C3%A5r%20makt> ;
                whois:stage <Nordahl_Grieg_birth>, <Nordahl_Grieg_death> ;
                a foaf:Person ;
                rdfs:label "Nordahl Grieg" ;
                owl:sameAs <http://dbpedia.org/resource/Nordahl_Grieg> ;
                skos:hiddenLabel "Nordahl Grieg" ;
                foaf:familyName "Grieg" ;
                foaf:givenName "Nordahl" ;
                foaf:name "Nordahl Grieg" .

However, I had a hard time using OntoWiki to achieve this.

The entry http://data.bbib.no/data/V%C3%A5r%20%C3%A6re%20og%20v%C3%A5r%20makt
and http://data.bbib.no/data/Ung%20m%C3%A5%20verden%20ennu%20v%C3%A6re was correctly converted to a proper URL by RDFAuthor. The entry http://data.bbib.no/data/Ung%20m%C3%A5%20verden%20ennu%20v%C3%A6re%20%3A%20roman was not. I suppose this is due to the inclusion of the character sequence " : ".

To create this link, I used the service at http://meyerweb.com/eric/tools/dencoder/ to encode the string "http://data.bbib.no/data/Ung må verden ennu være : roman", and pasted the encoded string into the add property widget in OntoWiki.

Since OntoWiki does not play well with urlencoded URI's in the first place, as reported in AKSW/OntoWiki#145, I then had to paste the urlencoded URI into the View Resource box of OntoWiki in order to specify a label for the resource.

The label is now visible in the OntoWiki interface at http://data.bbib.no/view/r/Nordahl_Grieg

;)Frode

frodeseverin commented 11 years ago

Interestingly, links to exsternal IRI's seems to be handled differently, albeit still wrong.

See https://github.com/AKSW/OntoWiki/issues/145#issuecomment-9375027 again for a description. Possibly the two previos posts there should have been made in this issue here. Sorry.