From: Uldis B. <cap...@gm...> - 2012-09-23 09:52:01
|
Hi Rob > Could you please supply an example of RDF/XML that reproduces this problem > in order for us to investigate it > > TraceParsing would not show any warnings only parsing debug information, > subscribe to the Warning event on the parser if you wish to do that though > I'm not sure if the RdfXmlParser ever generates any warnings Could you point me to an example how to subscribe to Warning events? Found out more re this problem. The behavior is different depending on how you call the parser. This code does not return an error message (and parsing the RDF below returns a triple treating <error> property as a relative URI): var p = new RdfXmlParser(); g.LoadFromFile(fname, p); While this code returns an error (try / catch omitted from the snippet for brevity): var p = new RdfXmlParser(); p.Load(g, fname) Parser Error [Line 4 Column 6] Cannot resolve a QName in the Default Namespace when there is no in-scope Base URI and no Default Namespace defined RDF/XML example: <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> <error>no info how to convert this element: creator</error> </rdf:Description> </rdf:RDF> Uldis > ________________________________ > From: "Uldis Bojars" <cap...@gm...> > Sent: Saturday, September 22, 2012 5:41 AM > To: dot...@li... > Subject: [dotNetRDF-Support] How to validate RDF/XML with DotNetRdf > > > Hi, > > DotNetRdf seems to be tolerant to errors when parsing RDF/XML (with > RdfXmlParser and Graph.LoadFromFile). > > E.g., in a file which has an element w/o namespace and no default > namespace defined the W3C RDF validator would return errors but > DotNetRdf parses the file without even a warning (unless .TraceParsing > = true is not sufficient to show warnings). > > Is it possible to do strict RDF/XML validation with DotNetRdf, failing > with an exception when validation errors appear? > > Thanks, > Uldis > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > |