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

Andy Seaborne commented on JENA-297:
------------------------------------

This is a question - maybe the users mailing list is better?  It certainly 
isn't "critical".

You will need to ask the Protege people about Protege.

Jena parses that file just fine:

rdfcat eu1.n3 =>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:j.0="http://aNameSpace/";>
  <j.0:BrokenThing rdf:about="http://aNameSpace/TestWith%3AColon"/>
  <j.0:BrokenThing rdf:about="http://aNameSpace/TestWith3AColon"/>
</rdf:RDF>

 riot eu1.n3 ==>
<http://aNameSpace/TestWith%3AColon> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://aNameSpace/BrokenThing> .
<http://aNameSpace/TestWith3AColon> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://aNameSpace/BrokenThing> .

Jena also correctly calculates namespace and local name according to the rules 
of XML Namespaces.

"TestWith%3AColon" is not a valid local name.

The spec is:
http://www.w3.org/TR/REC-xml-names/

A local part of an XML 

[8]     PrefixedName       ::=          Prefix ':' LocalPart 
[11]  LocalPart    ::=          NCName
[4]     NCName     ::=          Name - (Char* ':' Char*)        /* An XML Name, 
minus the ":" */

In XML, 'Name' can not have a % in it.

You can not have raw colon in an XML prefixed name.

In RDF/XML, only properties must be in prefixed name form.  Subject and objects 
can be written in long form in strings as shown above.

Note: %3A is not putting a colon in a URI.  It is not an escape mechanism - it 
encodes.  The URI really does have the 3 characters %-3-A in it.


                
> N3 Parser and escaped ( %3A ) colon 
> ------------------------------------
>
>                 Key: JENA-297
>                 URL: https://issues.apache.org/jira/browse/JENA-297
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: IRI, Jena, RIOT
>    Affects Versions: Jena 2.7.3
>            Reporter: Jerry Dimitriou
>            Priority: Critical
>         Attachments: eu1.n3
>
>
> Having the following n3 file, I get a tottaly different behaviour when 
> calling getNameSpace() and getLocalName for the resources.
> For resource:
> <http://aNameSpace/TestWith%3AColon> 
> I get:
> namespace: http://aNameSpace/TestWith%3A
> LocalName: Colon
> For resource:
> <http://aNameSpace/TestWith3AColon> 
> I get:
> namespace: http://aNameSpace/
> LocalName: TestWith3AColon
> First one is wrong, second is correct. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to