Rob, the purpose is round-tripping user input. If the user provided invalid URI values, they need to be presented back to the user with an error message, giving him/her a chance to correct the errors.
This requires being able to both read and write Models with invalid URIs. We make sure however, that unless the validation is successful, the data cannot be processed any further (the user is not allowed to save it). On Tue, Jul 26, 2016 at 11:14 AM, Rob Vesse <[email protected]> wrote: > Is there a particular reason you want/need to move malformed data around? > > It seems like this is just a problem waiting to happen > > On 26/07/2016 09:34, "Martynas Jusevičius" <[email protected]> wrote: > > RDF/XML (plain) in this case. I would of course prefer a > format-agnostic solution. > > On Tue, Jul 26, 2016 at 10:21 AM, Andy Seaborne <[email protected]> wrote: > > Which serialization format are you working with? > > > > Andy > > > > > > On 25/07/16 22:44, Martynas Jusevičius wrote: > >> > >> Hey, > >> > >> I was planning to set an ErrorHandler on WriterGraphRIOT instance, but > >> it turns such setter does not exist. > >> > >> My ErrorHandler allows invalid URIs to be read without throwing > >> exceptions. However model.write() throws BadURIException when writing > >> them. So round-tripping such Model currently does not work. How do I > >> handler writer errors? > >> > >> I think it would make sense to reuse the error handler between RIOT > >> readers and writers. > >> For example, if it is set to strict, both throw exceptions on invalid > >> URIs. > >> If it is set to lax, invalid URIs are allowed during both during > >> parsing and writing. > >> That would make round-tripping easy. > >> > >> Martynas > >> atomgraph.com > >> > > > > > > >
