rvesse commented on issue #2376: URL: https://github.com/apache/jena/issues/2376#issuecomment-2024814756
Historically `Resource.getLocalName()` uses RDF/XML specific local name rules, which early versions of other syntaxes also used to follow. As RDF/XML has become less and less prevalent other formats relaxed those rules to allow for a wider range of characters in the local name portion of their prefixed name syntaxes but given Jena's long history early parts of the API like `Model` and `Resource` have not really changed in that regard. There are other ways to present URIs e.g. `PrefixMapping.shortForm()` or `PrefixMap.abbreviate()` that should be used if you want more generic URI shortening and these will use more modern rules about what is allowed in the local name portion of URIs Or you could look at the `NodeFormatter` API if you plan to generate a lot of shortened URIs in your outputs -- 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]
