Open rodneyrehm opened 12 years ago
The extraction is not prio 1, first I have to make the bug fixes -- Mark Nottingham added some new test cases to https://github.com/uri-templates/uritemplate-test and my implementation fails that new tests. Of course only a subset of templates are extractable, and it is no easy job to determine, which are. So I will start with very simple one and then extend, when needed. e.g. I will start with only complete path segments ("/fixed/{segmentVar}/anotherfixed") and disallow explosions ("*")
By the way, I can completely understand your thoughts about the rfc. All your points. And I have some amendments: the encodings of the uri template rfc do not match the encodings of the uri rfc. For example, the '@' has to be encoeded to %40 for {?x} but is allowed in uris like http://www.example.com?a=@ But the uri rfc is so complex and there is no test case project...
By the way, you are from germany, too. Why are we talking Englisch?
So I will start with very simple one and then extend, when needed.
I was considering trashing my own implementation and simply referencing yours in URI.js. Which would only make sense if yours allowed extraction before I could get around to implementing it.
By the way, you are from germany, too. Why are we talking Englisch?
Yes, I'm from Germany. We are speaking English because this is the OS world and other may want to chime in. :)
+1 for extraction support ,)
@rodneyrehm You didn't get around to implementing extraction, right? geraintluff/uri-templates seems to do the job or do you know of a better implementation?
I've not implemented this in URI.js yet. I'm rather playing with the idea of binding an external library and throwing out my own implementation. But I haven't looked at the problem in a while. Feel free to open another issue over at URI.js
@mb21 You are right, I did not manage to implement extraction, yet. I saw the implementation you mentioned, but I did not test it
Hey Franz,
nice work! Of course I only found your implementation hours after publishing my own. Just wanted to point you to uri-templates by Marc Portier and my URITemplate. I did a little performance testing - your implementation is clearly in the lead. grats!
How are your plans regarding the extraction of values through templates coming?