sparna-git / skos-play

SKOS-Play allows to print SKOS files in HTML or PDF. It also embeds xls2rdf to generate RDF from Excel.
http://labs.sparna.fr/skos-play
GNU Lesser General Public License v3.0
67 stars 12 forks source link

Bug when a URI is in the concept scheme comment #3

Closed jennet closed 5 years ago

jennet commented 5 years ago

If you happen to have mentioned URLs (CURIE or full) in the rdfs:comment of the scheme, it will bug out the output:

Output:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix test: <http://example.org/def/> .

<http://example.org/test/TestScheme> a skos:ConceptScheme;
  rdfs:comment "A SKOS concept scheme of test:ConceptType concepts"@en;
  rdfs:label "Test Scheme"@en;
  skos:hasTopConcept test:concept-1, test:concept-2, test:concept-3 .

test:concept-1 a skos:Concept;
  <A\u0020SKOS\u0020concept\u0020scheme\u0020of\u0020test:ConceptType\u0020concepts>
    "Label 1"@en;
  skos:inScheme <http://example.org/test/TestScheme>;
  skos:topConceptOf <http://example.org/test/TestScheme> .

test:concept-2 a skos:Concept;
  <A\u0020SKOS\u0020concept\u0020scheme\u0020of\u0020test:ConceptType\u0020concepts>
    "Label 2"@en;
  skos:inScheme <http://example.org/test/TestScheme>;
  skos:topConceptOf <http://example.org/test/TestScheme> .

test:concept-3 a skos:Concept;
  <A\u0020SKOS\u0020concept\u0020scheme\u0020of\u0020test:ConceptType\u0020concepts>
    "Label 3"@en;
  skos:inScheme <http://example.org/test/TestScheme>;
  skos:topConceptOf <http://example.org/test/TestScheme> .

Link to excel file used

tfrancart commented 5 years ago

Thanks for reporting, and thanks for providing the test case. This is now fixed and the provided test file is converted properly. Come back if you spot something else.