afs commented on issue #2620:
URL: https://github.com/apache/jena/issues/2620#issuecomment-2268879778

   I can't make Jena4 cause an error parsing; it does throw an exception when 
writing the model due to a relative IRI for a property.
   
   Jena4 parsing issues warnings, as does Jena5.
   
   There is a difference output between Jena4 and Jena5.
   
   ```xml
   <?xml version="1.0"?>
   
   <Ontology xmlns:p="http://example/ns#";>
     <Prefix p:name="rdf"/>
   </Ontology>
   ```
   with `p:name` - no warnings. If the XML attribute is `name=` (no namespace) 
there is a warning.
   
   In Jena4, ARP issues a warning and outputs a relative URI property. It also 
generate an relative URI for `Ontology`.
   
   In Jena5, RRX issues a warning and skips the triple. It resolves the 
`Ontology` against the base (and there is always a base which may be external).
   
   This is by design. In writing RRX, I checked all the cases ARP supports. It 
was decided by the RDF 1.0 WG that bare attributes were not legal - they had 
been in the earlier design phases but that never made it to a spec. So in RRX 
it a warning and skipping, it is not a hard error due to legacy with ARP. 
Relative URIs will get into trouble later!
   
   I'd be happy for that to become a error, not warning.
   
   The fact that the doc parses as RDF/XML at all is because the root qname 
does not have to be `rdf:RDF`, for a single top-level element, that can be 
omitted. This is the case Jena4 and Jena5, in ARP and RRX.
   
   ARP (0 - the original; 1 - more integrated into RIOT error handling) is 
available in Jena5, at the moment, as lang name "arp0", "arp1" or as a file 
extension, and deprecated constant `RRX.RDFXML_ARP0`
   
   Expect ARP0 to go away soon. 
   
   ARP1 was the RDF/XML parser from started in 4.7.0 to 4.10.0,
   


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