srdc / ontmalizer

A tool that performs comprehensive transformations of XML Schemas (XSD) and XML data to RDF/OWL automatically
Other
78 stars 43 forks source link

Please Help. XML to OWL #14

Open gabyluna opened 7 years ago

gabyluna commented 7 years ago

Hi, A question, I want to transform an xml file to owl, but when for example I put these lines of code: XSD2OWLMapper mapping = new XSD2OWLMapper(new File("C:/Users/usuario/Desktop/report1.xsd")); mapping.setObjectPropPrefix(""); mapping.setDataTypePropPrefix(""); mapping.convertXSD2OWL();

// This part converts XML instance to RDF data model.
XML2OWLMapper generator = new XML2OWLMapper(
    new File("C:/Users/usuario/Desktop/report.xml"), mapping);
generator.convertXML2OWL();

// This part prints the RDF data model to the specified file.
try{
    File f = new File("C:/Users/usuario/Desktop/report1.n3");
    f.getParentFile().mkdirs();
    FileOutputStream fout = new FileOutputStream(f);
    generator.writeModel(fout, "N3");
    fout.close();

} catch (Exception e){
    e.printStackTrace();
}

  I have this error:

3050 [main] WARN org.apache.jena.rdf.model.impl.RDFDefaultErrorHandler - unknown-source: {W136} Relative URIs are not permitted in RDF: specifically These are the files I'm using

files.zip

I do not know why, please help. I will be grateful if you give me some hints.

lewismc commented 7 years ago

@gabyluna I am getting the same error. I'll have a look at it now and see if I can find a fix.