Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
- type="text/javascript">
- </script>
- <script type="text/javascript">
- $(document).ready(function() {
- var q='PREFIX dcterms: <http://purl.org/dc/terms/>\
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\
- PREFIX dbo: <http://dbpedia.org/ontology/>\
- PREFIX dbr: <http://dbpedia.org/page/>\
- PREFIX yago: <http://dbpedia.org/class/yago/>\
- \
- select ?nombre ?X ?descripcion where {\
- ?X rdf:type yago:Bat102139199 .\
- ?X rdfs:label ?nombre.\
- ?X dbo:abstract ?descripcion.\
- } LIMIT 100\
- order by ?nombre';
- $.ajax({
- dataType: 'jsonp',
- data: {
- query: q,
- format: 'application/sparql-results+json'
- },
- url: 'http://dbpedia.org/sparql',
- success: function(data){
- $(data.results.bindings).each(function(i, item){
- $("#results").append("<tr><td class='persona'>"+item.nombre.value+"</td>\
- <td><a href='"+item.X.value+"' class='uri'>"+item.nombre.value+"</a></td>\
- <td class='nacimiento'>"+item.descripcion.value+"</td>");
- });
- }
- });
- });
- </script>
- </head>
- <h1>Demo Plantilla: Novelistas Chilenos</h1>
- <body>
- <table id="results" style="float: left">
- <tr>
- <th>Nombre</th>
- <th>URI</th>
- <th>Descripcion</th>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement