Harold-Solbrig / funowl

Pythonic representation of OWL through the OWL functional syntax
Creative Commons Zero v1.0 Universal
50 stars 5 forks source link

UserWarning: Code: f is not defined in namespace XSD #40

Closed cmungall closed 2 years ago

cmungall commented 2 years ago

sometimes generation will make this:

/Users/cthoyt/.virtualenvs/obo/lib/python3.10/site-packages/funowl/literals.py:180: UserWarning: Code: f is not defined in namespace XSD
  l = g.value(XSD.f, RDF.type)

(I will prepare a full test case later)

hsolbrig commented 2 years ago

I'm curious why this doesn't ALWAYS generate a warning, as "f" is not a valid XML Schema value, no?

hsolbrig commented 2 years ago

Never mind -- I have it in my unit tests -- I need to change that 'f' to something else. Will do

hsolbrig commented 2 years ago

Fixed. There may be other edge cases of this sort that leak out -- I should probably put together a "kitchen sink" literal -- maybe just embed a significant chunk of an ontology in a literal to make sure that the parser doesn't burp. I debated using a parser like ANTLR or PyParsing, but the language was just on the edge of making it worthwhile...