bergie / VIE

Semantic Interaction Framework for JavaScript
http://viejs.org/
MIT License
303 stars 56 forks source link

URIs don't begin with < or end with > #124

Open jpmccu opened 12 years ago

jpmccu commented 12 years ago

Especially ones embedded in RDFa. You're probably thinking of N3-based representations, but the <>s aren't actually part of the URI. I may have missed some edge cases where you were relying on the <>s for something, but at least now your URIs aren't broken, and you can accept real ones.

travisbot commented 12 years ago

This pull request fails (merged 7502d468 into 0289577c).

bergie commented 12 years ago

Thanks for the contribution! URIs were wrapped in < and > in older JSON-LD specifications, which is why we still do it.

There has been some discussion (and a ticket, #110) on this, and the most important consideration is how to do this in a way that it doesn't break existing implementations. For this we need especially isReference to be rock-solid. And probably we need a version of toJSONLD that is able to return the old format.

jpmccu commented 12 years ago

That's reasonable. I think that the library should focus on keeping the <>s in JSON-LD without pulling them into the library itself. I'll look again at toJSONLD and isReference and the test failures. I was trying to read in some RDFa from an HTML page which failed originally because I didn't include <>s around my URIs, as the RDFa specification says. I couldn't find a way to execute the unit tests from my local git repo. Is there documentation on that?

Thanks, Jim

bergie commented 12 years ago

@jimmccusker you need to build your local VIE version by running ant.

Then just open test/index.html file in a browser.

Optionally you can also do:

$ npm install
$ npm test