Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added XSLT and generated XML, updated README
- Loading branch information
Erik Wilde
committed
Dec 11, 2012
1 parent
75616a2
commit e2127e0
Showing
7 changed files
with
1,544 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,200 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<tests> | |||
<test name="Additional Examples 1" level="4"> | |||
<variables> | |||
<variable name="id"> | |||
<string>person</string> | |||
</variable> | |||
<variable name="token"> | |||
<string>12345</string> | |||
</variable> | |||
<variable name="fields"> | |||
<array> | |||
<string>id</string> | |||
<string>name</string> | |||
<string>picture</string> | |||
</array> | |||
</variable> | |||
<variable name="format"> | |||
<string>json</string> | |||
</variable> | |||
<variable name="q"> | |||
<string>URI Templates</string> | |||
</variable> | |||
<variable name="page"> | |||
<string>5</string> | |||
</variable> | |||
<variable name="lang"> | |||
<string>en</string> | |||
</variable> | |||
<variable name="geocode"> | |||
<array> | |||
<string>37.76</string> | |||
<string>-122.427</string> | |||
</array> | |||
</variable> | |||
<variable name="first_name"> | |||
<string>John</string> | |||
</variable> | |||
<variable name="last.name"> | |||
<string>Doe</string> | |||
</variable> | |||
<variable name="Some%20Thing"> | |||
<string>foo</string> | |||
</variable> | |||
<variable name="number"> | |||
<integer>6</integer> | |||
</variable> | |||
<variable name="long"> | |||
<double>37.76</double> | |||
</variable> | |||
<variable name="lat"> | |||
<double>-122.427</double> | |||
</variable> | |||
<variable name="group_id"> | |||
<string>12345</string> | |||
</variable> | |||
<variable name="query"> | |||
<string>PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?book ?who WHERE { ?book dc:creator ?who }</string> | |||
</variable> | |||
<variable name="word"> | |||
<string>drücken</string> | |||
</variable> | |||
<variable name="Stra%C3%9Fe"> | |||
<string>Grüner Weg</string> | |||
</variable> | |||
<variable name="random"> | |||
<string>šö䟜ñꀣ¥‡ÑÒÓÔÕÖ×ØÙÚàáâãäåæçÿ</string> | |||
</variable> | |||
<variable name="assoc_special_chars"> | |||
<object> | |||
<field name="šö䟜ñꀣ¥‡ÑÒÓÔÕ"> | |||
<string>Ö×ØÙÚàáâãäåæçÿ</string> | |||
</field> | |||
</object> | |||
</variable> | |||
</variables> | |||
<testcases> | |||
<testcase template="{/id*}" result="/person"/> | |||
<testcase template="{/id*}{?fields,first_name,last.name,token}" | |||
result="/person?fields=id,name,picture&first_name=John&last.name=Doe&token=12345/person?fields=id,picture,name&first_name=John&last.name=Doe&token=12345/person?fields=picture,name,id&first_name=John&last.name=Doe&token=12345/person?fields=picture,id,name&first_name=John&last.name=Doe&token=12345/person?fields=name,picture,id&first_name=John&last.name=Doe&token=12345/person?fields=name,id,picture&first_name=John&last.name=Doe&token=12345"/> | |||
<testcase template="/search.{format}{?q,geocode,lang,locale,page,result_type}" | |||
result="/search.json?q=URI%20Templates&geocode=37.76,-122.427&lang=en&page=5/search.json?q=URI%20Templates&geocode=-122.427,37.76&lang=en&page=5"/> | |||
<testcase template="/test{/Some%20Thing}" result="/test/foo"/> | |||
<testcase template="/set{?number}" result="/set?number=6"/> | |||
<testcase template="/loc{?long,lat}" result="/loc?long=37.76&lat=-122.427"/> | |||
<testcase template="/base{/group_id,first_name}/pages{/page,lang}{?format,q}" | |||
result="/base/12345/John/pages/5/en?format=json&q=URI%20Templates"/> | |||
<testcase template="/sparql{?query}" | |||
result="/sparql?query=PREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%20SELECT%20%3Fbook%20%3Fwho%20WHERE%20%7B%20%3Fbook%20dc%3Acreator%20%3Fwho%20%7D"/> | |||
<testcase template="/service{?word}" result="/service?word=dr%C3%BCcken"/> | |||
<testcase template="/lookup{?Stra%C3%9Fe}" | |||
result="/lookup?Stra%C3%9Fe=Gr%C3%BCner%20Weg"/> | |||
<testcase template="{random}" | |||
result="%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"/> | |||
<testcase template="{?assoc_special_chars*}" | |||
result="?%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95=%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"/> | |||
</testcases> | |||
</test> | |||
<test name="Additional Examples 2" level="4"> | |||
<variables> | |||
<variable name="id"> | |||
<array> | |||
<string>person</string> | |||
<string>albums</string> | |||
</array> | |||
</variable> | |||
<variable name="token"> | |||
<string>12345</string> | |||
</variable> | |||
<variable name="fields"> | |||
<array> | |||
<string>id</string> | |||
<string>name</string> | |||
<string>picture</string> | |||
</array> | |||
</variable> | |||
<variable name="format"> | |||
<string>atom</string> | |||
</variable> | |||
<variable name="q"> | |||
<string>URI Templates</string> | |||
</variable> | |||
<variable name="page"> | |||
<string>10</string> | |||
</variable> | |||
<variable name="start"> | |||
<string>5</string> | |||
</variable> | |||
<variable name="lang"> | |||
<string>en</string> | |||
</variable> | |||
<variable name="geocode"> | |||
<array> | |||
<string>37.76</string> | |||
<string>-122.427</string> | |||
</array> | |||
</variable> | |||
</variables> | |||
<testcases> | |||
<testcase template="{/id*}" result="/person/albums/albums/person"/> | |||
<testcase template="{/id*}{?fields,token}" | |||
result="/person/albums?fields=id,name,picture&token=12345/person/albums?fields=id,picture,name&token=12345/person/albums?fields=picture,name,id&token=12345/person/albums?fields=picture,id,name&token=12345/person/albums?fields=name,picture,id&token=12345/person/albums?fields=name,id,picture&token=12345/albums/person?fields=id,name,picture&token=12345/albums/person?fields=id,picture,name&token=12345/albums/person?fields=picture,name,id&token=12345/albums/person?fields=picture,id,name&token=12345/albums/person?fields=name,picture,id&token=12345/albums/person?fields=name,id,picture&token=12345"/> | |||
</testcases> | |||
</test> | |||
<test name="Additional Examples 3: Empty Variables"> | |||
<variables> | |||
<variable name="empty_list"> | |||
<array/> | |||
</variable> | |||
<variable name="empty_assoc"> | |||
<object/> | |||
</variable> | |||
</variables> | |||
<testcases> | |||
<testcase template="{/empty_list}" result=""/> | |||
<testcase template="{/empty_list*}" result=""/> | |||
<testcase template="{?empty_list}" result="?empty_list="/> | |||
<testcase template="{?empty_list*}" result=""/> | |||
<testcase template="{?empty_assoc}" result="?empty_assoc="/> | |||
<testcase template="{?empty_assoc*}" result=""/> | |||
</testcases> | |||
</test> | |||
<test name="Additional Examples 4: Numeric Keys"> | |||
<variables> | |||
<variable name="42"> | |||
<string>The Answer to the Ultimate Question of Life, the Universe, and Everything</string> | |||
</variable> | |||
<variable name="1337"> | |||
<array> | |||
<string>leet</string> | |||
<string>as</string> | |||
<string>it</string> | |||
<string>can</string> | |||
<string>be</string> | |||
</array> | |||
</variable> | |||
<variable name="german"> | |||
<object> | |||
<field name="11"> | |||
<string>elf</string> | |||
</field> | |||
<field name="12"> | |||
<string>zwölf</string> | |||
</field> | |||
</object> | |||
</variable> | |||
</variables> | |||
<testcases> | |||
<testcase template="{42}" | |||
result="The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"/> | |||
<testcase template="{?42}" | |||
result="?42=The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"/> | |||
<testcase template="{1337}" result="leet,as,it,can,be"/> | |||
<testcase template="{?1337*}" | |||
result="?1337=leet&1337=as&1337=it&1337=can&1337=be"/> | |||
<testcase template="{?german*}" | |||
result="?11=elf&12=zw%C3%B6lf?12=zw%C3%B6lf&11=elf"/> | |||
</testcases> | |||
</test> | |||
</tests> |
Oops, something went wrong.