You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Hendy Irawan (JIRA)" <ji...@apache.org> on 2015/01/29 06:36:34 UTC

[jira] [Comment Edited] (JENA-862) NodeFactoryExtra.parseNode() gives wrong result for ""

    [ https://issues.apache.org/jira/browse/JENA-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296404#comment-14296404 ] 

Hendy Irawan edited comment on JENA-862 at 1/29/15 5:35 AM:
------------------------------------------------------------

I am still confused why you think that this result is not incorrect:

* toString() = hasPopulationDensity
* nameSpace=h
* localName=asPopulationDensity

At least it should throw an Exception, signifying that it doesn't parse the representation.

I do agree that having an additional overload for {{Prologue}} or base URI is a good idea.

{{parseNode()}} not knowing the base URI (currently) is not a problem, since the caller knows the base URI and can pass that to {{parseNode()}} in order to understand relative URIs.


was (Author: ceefour):
I am still confused why you think that this result is not incorrect:

* toString() = hasPopulationDensity
* nameSpace=h
* localName=asPopulationDensity

At least it should throw an Exception, signifying that it doesn't parse the representation.

I do agree that having an additional overload for {{Prologue}} or base URI is a good idea.


> 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)