You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/12/06 01:26:35 UTC
[jira] [Comment Edited] (JENA-603) Literal.getNamespace() brings
incorrect results
[ https://issues.apache.org/jira/browse/JENA-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13840732#comment-13840732 ]
Andy Seaborne edited comment on JENA-603 at 12/6/13 12:25 AM:
--------------------------------------------------------------
{{getNameSpace}} returns an XML-valid namespace for the URI for any use which means it must be splitable for a qname.
XML qnames can not have a digit starting the local part. {{4abacomaosidm33naosdna}} is illegal in XML and hence RDF/XML.
The best split (longest local part) is {{(http://somenamespace.com#34, abacomaosidm33naosdna)}}.
was (Author: andy.seaborne):
{{getNameSpace}} returns and XML-valid namespace for the URI for any use.
XML qnames can not have a digit starting the local part. {{4abacomaosidm33naosdna}} is illegal in XML and hence RDF/XML.
The best split (longest local part) is {{(http://somenamespace.com#34, abacomaosidm33naosdna)}}.
> Literal.getNamespace() brings incorrect results
> -----------------------------------------------
>
> Key: JENA-603
> URL: https://issues.apache.org/jira/browse/JENA-603
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 2.11.0
> Reporter: Yordan Grancharov
> Assignee: Andy Seaborne
> Priority: Minor
>
> Greetings, I'm getting incorrect results when trying to get the namespace out of a resource's IRI. For example this code:
> {code}
> Resource r = ResourceFactory.createProperty("http://somenamespace.com#34abacomaosidm33naosdna");
> String ns = r.getNameSpace();
> System.out.println(ns);
> {code}
> will output "http://somenamespace.com#34" instead of "http://somenamespace.com#"
> That's because the local name starts with a number. Is this the expected behavior? If yes, please excuse me. If not, I can assist with some code.
--
This message was sent by Atlassian JIRA
(v6.1#6144)