rdftab.rs
rdftab.rs copied to clipboard
Stop removing trailing whitespace from literals
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.
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.
@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
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