Search Mailing List Archives
[protege-owl] Problem with & loading an OWL XML
tar at ISI.EDU
Fri Apr 16 12:47:59 PDT 2010
On Apr 16, 2010, at 1:43 AM, Erick Mendoza Moral wrote:
> Thank you again Timothy.
> Please, correct me if I'm wrong, but as far as I know a parser supporting escape sequences should interpret '&' and '&' as the same characters, so, consequently, it should interpret "&xsd;minInclusive" and "&xsd;minInclusive" as the same tokens, isn't it?
No. This has to be wrong.
Otherwise there would be absolutely no way for you to insert a literal "&" character in the text. If the escape sequences were recursively expanded, then it would make no sense to even have the escape sequence "&" because it would always be treated exactly the same as "&". And that would mean that you couldn't ever quote the ampersand character.
So the parser in this case is working correctly. The problem is that you have created a syntactically incorrect input file. So the input file will need to be corrected, since the parser is performing exactly according to the specification.
> Except that the parser substitute '&xsd;' for "http://www.w3.org/2001/XMLSchema#" prior to interpret the escape sequence '&' as the character '&', but in that case it should have misinterpreted the rest of '&xsd;' sequences, and it didn't.
I would be surprised that the parser performed as you suggest. Did the parser actually read the sequence "&xsd;" the same way as "&xsd;"?
> I attach the owl and dtd files, if you want to have a look at them, the conflicting escape sequences are in lines 654, 666, 678, 760 and 850.
I tried loading the ontology.owl file in Protege 3.4.4 and it gets a parse error on line 2 of your file. So I doubt that anything can be happening beyond that.
You need to change your processing code to emit the correct character and not encode it the way you are doing.
More information about the protege-owl