[
https://issues.apache.org/jira/browse/JENA-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291815#comment-14291815
]
Andy Seaborne commented on JENA-862:
------------------------------------
IRI resolution is not done in the tokenizer. It depends on the parser
environment. See {{ParserProfile}}.
The fact that {{^^xsd:date}} is handled by {{parseNode(String nodeString}} is
luck - there is a standard convenience of some well known prefixes. It is not
coming from the data.
You could contribute code that takes a {{Prologue}} (the combination of prefix
map and base URI) or the base URI case as you describe but the result is not
incorrect, it just not doing what you want it to because the parser/tokenizer
does not work that way.
After parsing, Yago2s does not have relative URIs. The base in the data files
is {{<http://yago-knowledge.org/resource/>}} . Once parsed, there are only
absolute URIs. The Model goes not know the base URI (if it could at all -
depending on the route in, there may not be one, it is a transfer/http concept).
> NodeFactoryExtra.parseNode() gives wrong result for "<someLocalName>"
> ---------------------------------------------------------------------
>
> Key: JENA-862
> URL: https://issues.apache.org/jira/browse/JENA-862
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.12.1
> Reporter: Hendy Irawan
> Priority: Trivial
>
> For example:
> {code}
> NodeFactoryExtra.parseNode('<hasPopulationDensity>')
> {code}
> (prefixMap has no effect, I even tried setting a "default" namespace by
> adding prefixMap ''='http://yago-knowledge.org/resource/' but has no effect)
> It gives a {{Node_URI}} with:
> * toString() = hasPopulationDensity
> * nameSpace=h
> * localName=asPopulationDensity
> I'd expect {{nameSpace=null}} and {{localName=hasPopulationDensity}} at the
> minimum.
> Or if possible, support a default namespace in prefixMap so when a "" prefix
> is configured I can get:
> * toString() = http://yago-knowledge.org/resource/hasPopulationDensity
> * nameSpace=http://yago-knowledge.org/resource/
> * localName=hasPopulationDensity
> Or perhaps I'm doing this wrong?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)