rvesse commented on issue #1882: URL: https://github.com/apache/jena/issues/1882#issuecomment-1569732224
New lines are not permitted in single quoted literals unless you explicitly escape them as a `\n` so the input graph you show should technically be considered invalid syntax. If you want to use literal new line characters within a literal then you should use the triple quoted form instead > '\' (U+005C) may not appear in any quoted literal except as part of an escape sequence. Other restrictions depend on the delimiter: > > - Literals delimited by ' (U+0027), may not contain the characters ', LF (U+000A), or CR (U+000D). > - Literals delimited by ", may not contain the characters ", LF, or CR. > - Literals delimited by ''' may not contain the sequence of characters '''. > - Literals delimited by """ may not contain the sequence of characters """. See [RDF 1.1 Turtle - Quoted Literals](https://www.w3.org/TR/turtle/#turtle-literals) OTOH just because you use triple quoted literals on the input doesn't mean Jena will use them in the output. Jena is free to use whatever serialised form of the data it wants provided it preserves the semantics of the data. This kinda sounds like an XY problem to me. Presumably Skosmos isn't doing a good job of rendering literals with appropriate formatting and/or wrapping? So you've jumped to needing to modify the Jena parsers. The real solution is more likely a bug report against Skosmos asking them to improve how they render literals within their UI? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
