-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does typeof work only with CURIEs? #8
Comments
If you look at the other code paths, they are all calling But, regardless, if you drill down into the code you'll get to this bit: Line 489 in 57ca930
Which will generate a warning for a URL without "://" and an undefined prefix in the context -- but that's merely a warning. Then the code heads down here: Line 544 in 57ca930
Which will fail the first conditional if you have a colon -- and fall into the second one, which will fail because the parse mode for typeof (CURIE_PARSE_INSTANCEOF_DATATYPE) isn't supported there. So -- if you're getting a failure with a full URL for typeof, it looks like that might be culprit. I would have expected a full URL to work for typeof as well, but I didn't check the spec. cc: @msporny |
This should work now. I noticed that the xhtml1-rdfa1.1 test suite doesn't have a typeof example with a full URL -- so that needs updating. |
Hey @melvincarvalho - great spot on that bug and @dlongley has added a fix for it. That said, it's been difficult to keep that library up to date w/ the latest test suite (many more tests have been added to the test suite in a variety of different languages and librdfa doesn't do well with a few of those new tests). Granted, many of the new tests are corner cases, but a failed test is a failed test. I wouldn't depend on rapper to generate proper rdfa output - you will want to cross-check against a library that is more actively maintained (Gregg Kellogg's implementation, for example). It's a matter of time and priorities. We could fix up librdfa, but it doesn't really buy our company anything since we're planning on dropping all support for RDFa (in favor of JSON-LD). |
Awesome guys! I added a vocab term and rapper then passes. I was just using a standard rapper -g for testing. My normal (boring) way to mark things up is just to use full URLs. Great work on solving this so fast! |
That being said, it's open source: PRs FTW! |
I'd like to be able to use full URLs
Tested with rapper
Code reference:
librdfa/c/rdfa.c
Line 646 in 57ca930
The text was updated successfully, but these errors were encountered: