Hello, First of all, sorry if this question has already been asked. I did a search and some old result pop up (http://tech.groups.yahoo.com/group/jena-dev/message/1480), but this is still not clear for me.
1/ First question : I would like to create an individual with a space is its name : "room_Hamburg_Am Hauptbahnhof 3_07.OG_NIC7" To do so, I encode the name with URIRef and I get something like : "room_Hamburg_Am%20Hauptbahnhof%203_07.OG_NIC7" If this local name legal ? Now, if I create the individual : String namespace = "http://example.com/location.owl#" OntModel m_model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); Individual i = m_model.createIndividual(namespace + "room_Hamburg_Am%20Hauptbahnhof%203_07.OG_NIC7", aClass) and I pring the local name : println(i.getLocalName()) I then get : _07.OG_NIC7 Obviously there is something wrong here, because I expect "room_Hamburg_Am%20Hauptbahnhof%203_07.OG_NIC7", right ? 2/ Other question : I there a magic method in the Jena API that, given a String, transform it to a proper localName ? (sanitize it) I thought that URIRef.encode was doing this job, but it doesn't correct some illegal local names, such as the ones beginning with numbers (an entity with URI "http://example.com/location.owl#123" is illegal according the specs (http://www.w3.org/TR/xml-names/#NT-NCName)) I tried also IRIFactory, but it seems to only report errors, no correct them by itself. Thanks a lot by advance for any answer, Best regards N. Nobelis
