TW Web Site Page Population
From Semantic Portal Wiki
| TW Web Site |
| Project Information |
| Project Organization |
|
Meeting Notes |
| Design |
|
Use Cases |
| Development |
| Software & Services |
Sample Pages:
Architecture Diagram
Tim's notes on what Evan did
Evan presented at group meeting. meeting notes at [1]
Server-side request handling with .htaccess and php.
apache's mod_rewrite follows .htaccess to rewrite URI requested to invoke view.php
http://wineagent.tw.rpi.edu/tw.rpi.edu/instances/Deborah_L_McGuinness
gets rewritten to
http://wineagent.tw.rpi.edu/tw.rpi.edu/view.php?src=instances.rdf&q=Deborah_L_McGuinness
and view.php is invoked.
In view.php,
if Content-type is RDF/XML, create sparql "construct" (not select) query using params in URI, execute, and return as-is.
else, special cases for HTTP-Refer = mw and drupal. provides redirect to URL rewritten assuming equivalent local names.
else, SPARQL query + xsl execute SAME kind of query as above. return RDF/XML result, tucking in xml-stylesheet PI.
<?xml-stylesheet href="****** value figured out by view.php ******" type="text/xsl"?>
magic happens. series of queries based on the URI requested. (type). doing ask queries. stops on first ASK=True you find. right now, else ASK rdf:type -> href, else ASK rdf:type -> href ... hard coded in view.php
Future: use RDF to describe which classes have which xsl stylesheets that can process them.
<?xml-stylesheet href="/tw.rpi.edu/styles/generate/person.xsl" type="text/xsl"?>
whole file goes back to client, client requests stylesheet from generate.php.
How generate.php works:
bucket of xsls, all with xsl:template name=""
generate.php?q=person.xsl?r=aResource
all xsl:templates have 3 params: name, node (a node() for rdf:Description), uri (thing you are describing)
<?xml version="1.0"?> <?xml-stylesheet href="/tw.rpi.edu/styles/generate/person.xsl" type="text/xsl"?> <rdf:RDF
aside: Li: how to describe what drupal/smw sites I can go to to add descriptions. read-only Linked Data. but there's no way to find out where we can add content.
Li: how is any of this controlled by the iWebPageUser?

