rdftab.rs icon indicating copy to clipboard operation
rdftab.rs copied to clipboard

Stop removing trailing whitespace from literals

Open jamesaoverton opened this issue 4 years ago • 3 comments
trafficstars

I'm not sure where this is happening, but we shouldn't modify literals. I don't see where this could be happening in our Rust code. I hope it isn't happening in rio, but I guess we could fix that in our fork.

jamesaoverton avatar Apr 30 '21 15:04 jamesaoverton

I think the source of this is in trim_text here https://github.com/oxigraph/rio/blob/master/xml/src/parser.rs#L65

This is a setting for the underlying quick_xml: https://docs.rs/quick-xml/0.22.0/quick_xml/struct.Reader.html#method.trim_text

But when I turn off trim-text I get errors like this: https://github.com/oxigraph/rio/blob/master/xml/src/parser.rs#L661

I don't know how to handle them better.

jamesaoverton avatar May 25 '21 15:05 jamesaoverton

@cmungall How bad do you think it would be to bite this bullet and insist that literals cannot have leading or trailing whitespace? In ROBOT report this is currently considered a warning: http://robot.obolibrary.org/report_queries/annotation_whitespace

jamesaoverton avatar May 25 '21 20:05 jamesaoverton

I would say this is currently low priority but ultimately we need to preserve this, especially if we ever want to have a complete robot report replacement

cmungall avatar May 28 '21 14:05 cmungall