Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Problem with & loading an OWL XML

Timothy Redmond tredmond at stanford.edu
Fri Apr 16 06:38:13 PDT 2010


On 04/16/2010 01: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? 

I am not expert on this but I think that you are wrong.  For instance, I 
do not think that & and & will be interpreted in the same 
way.  This is the purpose of escape sequences - to prevent an 
alternative interpretation of the string. If somebody writes & 
then they are deliberately trying to avoid the interpretation of this as 
an ampersand.

In cases like these I tend to believe the parsers.

In addition in your ontology, things have been damaged from an owl point 
of view.  Even if &xsd; was interpreted to mean &xsd;, the &xsd; 
would not be interpreted correctly.  The !DOCTYPE entries at the top 
that explain how to expand &xsd; have been lost.

-Timothy


> 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 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.
>
>
> El 15/04/2010 18:02, Timothy Redmond escribió:
>> On 04/14/2010 12:30 AM, Erick Mendoza Moral wrote:
>>> Thanks for your answer, so, are you meaning that the OWLXML parser 
>>> doesn't interpret escape sequences properly? I make this question 
>>> because my OWL file has more than 2500 lines and it's full of 
>>> escaped ampersands, and the parser only misinterpret the 
>>> "&xsd;minInclusive" ocurrences.
>>
>> I am saying that by changing &xsd; to &xsd; you are changing the 
>> meaning of the ontology.  As far as I can tell the OWL/XML parser is 
>> interpreting escape sequences properly.  Before you make the change 
>> &xsd; is being transformed into "http://www.w3.org/2001/XMLSchema#" 
>> based on the !DOCTYPE statement at the top of the file.  After you 
>> make the change &xsd; is simply being interpreted as the string 
>> &xsd;.
>>
>> It makes sense to me that by making these changes you are changing 
>> the meaning of the owl xml file across the board. I suspect that this 
>> is simply the first one that does not parse.
>>
>> I don't know a lot about !DOCTYPE processing so I do not yet know 
>> where the standard is that describes this.
>>
>> -Timothy
>>>
>>> El 13/04/2010 19:50, Timothy Redmond escribió:
>>>>
>>>>> I had more escaped ampersands in the OWL XML file, but I only get 
>>>>> problems with this one. Anybody knows why? 
>>>>
>>>> As far as I can tell you have changed the meaning of the owl file.  
>>>> Probably the reason that this one gives you trouble is because the  
>>>> altered  meaning doesn't parse.
>>>>
>>>>> <DatatypeFacetRestriction facet="&xsd;minInclusive"> 
>>>>
>>>> This is talking about a facet called
>>>>
>>>>     http://www.w3.org/2001/XMLSchema#minInclusive
>>>>        
>>>>
>>>>> <DatatypeFacetRestriction facet="&xsd;minInclusive"> 
>>>>
>>>> I think that this one  is talking about a facet called
>>>>
>>>>     &xsd;minInclusive
>>>>        
>>>>
>>>> I am not even sure that this is even a valid name but it is 
>>>> definitely not  on the list of known  facets.
>>>>
>>>> -Timothy
>>>>
>>>>
>>>> On 04/13/2010 08:58 AM, Erick Mendoza Moral wrote:
>>>>> Hello,
>>>>>
>>>>> I have written a Java program that generates an OWL XML file using 
>>>>> an XSL, so I had to use the escape '&' instead of the 
>>>>> character '&'. When I try to load the file using Protégé 4.0 I get 
>>>>> an NullPointerException caused by this line:
>>>>>
>>>>> <DatatypeFacetRestriction facet="&xsd;minInclusive">
>>>>>
>>>>> If I change the escape sequence for an ampersand character:
>>>>>
>>>>> <DatatypeFacetRestriction facet="&xsd;minInclusive">
>>>>>
>>>>> then the ontology loads succesfully. I had more escaped ampersands 
>>>>> in the OWL XML file, but I only get problems with this one. 
>>>>> Anybody knows why?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> protege-owl mailing list
>>>>> protege-owl at lists.stanford.edu
>>>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>>>
>>>>> Instructions for unsubscribing: 
>>>>> http://protege.stanford.edu/doc/faq.html#01a.03
>>>>
>>>>
>>>> _______________________________________________
>>>> protege-owl mailing list
>>>> protege-owl at lists.stanford.edu
>>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>>
>>>> Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>>>>    
>>>
>>>
>>> _______________________________________________
>>> protege-owl mailing list
>>> protege-owl at lists.stanford.edu
>>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>>
>>> Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>>>    
>>
>>
>> _______________________________________________
>> protege-owl mailing list
>> protege-owl at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>> Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>>    
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100416/a5cfb2c5/attachment.html>


More information about the protege-owl mailing list