davidcockbill opened a new issue, #2376:
URL: https://github.com/apache/jena/issues/2376

   ### Version
   
   5.0.0-rc1
   
   ### What happened?
   
   When extracting the local name for nTriples with an object of 
https://schema.org/3DModel I get `DModel` rather than `3DModel`.
   
   Test code to reproduce:
   ```
       @Test
       void testJena()
       {
           final String nTriples = """
               _:3d_model <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://schema.org/3DModel> .
           """;
   
           final Model model = ModelFactory.createDefaultModel();
           final InputStream input = new 
ByteArrayInputStream(nTriples.getBytes(StandardCharsets.UTF_8));
           model.read(input, null, "nTriples");
   
           for (Statement stmt : model.listStatements().toList())
           {
               final RDFNode object = stmt.getObject();
               System.out.println("object name=" + 
object.asResource().getLocalName());
           }
       }
   ```
   
   From stepping through the code the problem looks to be with the use of 
Util.splitNamespaceXML(); in particular the `XMLChar.isNCNameStart(ch)` which 
is specifying that '3' not valid for the start of an xml tag. From a quick 
search online this statement appears to be correct for XML tags, but is 
`3DModel` really an XML tag? (i.e. should XML rules really be applied here?)
   
   Either way, the getLocalName() method returns the wrong value.
   
   
   
   ### Relevant output and stacktrace
   
   _No response_
   
   ### Are you interested in making a pull request?
   
   None


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

Reply via email to