<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Designing and Creating a Web Site Based on RDF Content</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Eero</forename><surname>Hyvönen</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Helsinki Institute for Information Technology (HIIT)</orgName>
								<orgName type="institution" key="instit1">University of Helsinki</orgName>
								<orgName type="institution" key="instit2">UNIV. OF HELSINKI</orgName>
								<address>
									<postBox>P.O. Box 26</postBox>
									<postCode>00014</postCode>
									<country key="FI">FINLAND</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Markus</forename><surname>Holi</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Helsinki Institute for Information Technology (HIIT)</orgName>
								<orgName type="institution" key="instit1">University of Helsinki</orgName>
								<orgName type="institution" key="instit2">UNIV. OF HELSINKI</orgName>
								<address>
									<postBox>P.O. Box 26</postBox>
									<postCode>00014</postCode>
									<country key="FI">FINLAND</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Kim</forename><surname>Viljanen</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Helsinki Institute for Information Technology (HIIT)</orgName>
								<orgName type="institution" key="instit1">University of Helsinki</orgName>
								<orgName type="institution" key="instit2">UNIV. OF HELSINKI</orgName>
								<address>
									<postBox>P.O. Box 26</postBox>
									<postCode>00014</postCode>
									<country key="FI">FINLAND</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Designing and Creating a Web Site Based on RDF Content</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">8D3781B7FAEDF949F8D697DA5E186366</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T09:41+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This paper presents a method and a tool for designing and automatically creating an HTML web site for publishing Semantic Web content represented in RDF(S). The idea is to specify the needed RDF to HTML transformation on two separate levels. On the HTML level, the layout of the pages can be described by an HTML layout designer by using templates and tags. On the RDF level, the semantics of the tags are specified by a system programmer in terms of logical rules based on the RDF(S) repository. The idea is to apply logic for defining the semantic linkage structure and the indices of the page repository. The method has been implemented as a tool called SWeHG for generating a static, semantically linked site of HTML pages from an RDF repository. As real life case applications, web exhibitions generated from museum collection metadata are presented.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Two Views of the Semantic Web</head><p>The notion of the Semantic Web<ref type="foot" target="#foot_0">1</ref>  <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b2">3]</ref> has two interpretations. From the machine's viewpoint, the Semantic Web manifests itself as a distributed source of interpretable metadata concerning resources, such as web pages <ref type="foot" target="#foot_1">2</ref> , documents, photos, and real world object. The metadata descriptions are given in terms of ontologies using frameworks and languages such as RDF(S) <ref type="foot" target="#foot_2">3</ref> and OWL <ref type="foot" target="#foot_3">4</ref> . From the human's viewpoint, the Semantic Web looks like the current web, i.e., it is a repository of HTML pages, but empowered with more useful semantics-based links, search engines, and intelligent web services.</p><p>A central question in the development of Semantic Web applications is how the content represented for the machine can be transformed for the human to view, i.e., how machine interpretable RDF(S) or OWL content proliferating the web can be rendered to the human end-user as a searchable and browsable HTML web site or space. In this paper we present a new approach and tool named "Semantic Web HTML Generator" (SWeHG) <ref type="bibr" target="#b8">[9]</ref> to address this problem (cf. figure <ref type="figure" target="#fig_0">1</ref>). The idea is to specify the structure and the layout of an HTML web site in terms of a set of HTML templates using a tag language. The templates can be used by a web layout designer who does not know the details of the underlying RDF(S) content or Semantic Web technologies. The semantics of the tags, i.e., the machine's view on the RDF level, is specified by a Semantic Web programmer in terms of logic predicates. A benefit of separating the HTML and RDF levels is that ontological details and variance can be hidden from the HTML designer. By modifying the semantics of the tag, content represented using different ontological structures can be mapped on the same HTML tags that the HTML designer is capable of using. The tag definitions can be re-used directly in applications based on similar ontologies and annotation schemas. The templates provide a declarative description of the web site structure, indices, and linkage. By modifying the templates alone in HTML, the same RDF(S) content can more easily be rendered in different ways in different applications to human end-users.</p><p>In the following, we first discuss two examples of semantically indexed and linked HTML web sites generated by SWeHG. The layout specifications with the corresponding tag definitions needed for the RDF to HTML transformation are then discussed. After this, the transformation process and its implementation are presented. In conclusion, experiences of our research and experimentation are summarized, related work is described, and directions for further research are outlined.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Example Applications</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Helsinki University Museum</head><p>The virtual exhibition of a photo archive in the Helsinki University Museum<ref type="foot" target="#foot_4">5</ref> was generated. The archive contained 629 photographs about the promotion ceremonies of the University of Helsinki. The content of the archive was transformed into RDF(S) format in an other application project <ref type="bibr" target="#b6">[7]</ref> and was used as it is by SWeHG. The domain knowledge consists of six ontologies with 329 promotion-related concept classes, such as "Person" and "Building", 125 properties, and 2890 instances, such as "Linus Torvalds" and the "Entrance of Cathedral of Helsinki".</p><p>In the photo annotation schema, the subject of a photograph is represented by a collection of ontology classes and individuals that appear on the image <ref type="foot" target="#foot_5">6</ref> . For example, if Linus Torvalds appears in a photo on a particular street, then the photo record is related directly with the corresponding person and street resources with a property corresponding to dc:subject. However, the relation between photos and subjects can be indirect, as well, involving traversal through several RDF arcs in the underlying knowledge base. For example, Linus Torvalds is present in a photograph as a Honorary Doctor. Then only an instance of such a role is associated with the image. The person instance in not directly linked with the image, but indirectly through the role instance. SWeHG predicate definition facility is very handy in hiding such annotation schema specific details from the HTML designer: the persons can be associated with images either directly or indirectly through roles. The criterion for association can be defined freely and conveniently by a declarative predicate. Using SWeHG to publish the archive provides the endusers with two services. First, the photos can be found along the different orthogonal views based on the ontologies. Second, the photos can be browsed by using the links created between semantically related photos. The links are grouped based on the semantics of the link. For example, there is a link group that points to other photos taken of the same person.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Espoo City Museum</head><p>Figure <ref type="figure" target="#fig_1">2</ref> presents the home page of the exhibition "Espoo City Museum on the Semantic Web" that was generated using SWeHG for the museum <ref type="foot" target="#foot_6">7</ref> . Seven RDF(S) ontologies are used with some 10,000 classes and individuals and the metadata is described in terms of 38 properties. The RDF(S) repositories where originally created for the semantic portal MuseumFinland <ref type="bibr" target="#b5">[6]</ref>. In this work, we could re-use the semantic recommendation predicates and the inference rule base developed for the original system, and the exhibition could be generated in a day or two.</p><p>In the RDF(S) repository, each ontological property of the collection objects in the exhibition, such as "material" is associated with a domain ontology of its own. For example, artifact, material, and technique ontologies have been defined based on the Finnish MASA Thesaurus <ref type="bibr" target="#b9">[10]</ref> of keywords used in several museums for indexing data. The ontology MAO <ref type="bibr" target="#b7">[8]</ref> created based on MASA contains some 6600 classes organized in a taxonomy. There is also a location ontology that defines geographical concepts such as "country" and "town". Their instances are individual areas and places. The places are related with each other by a partof meronymy. In the same way, an agent ontology defines concepts such as "person" and "company", whose instances are active individuals. There is also an ontology for time periods and an ontology of collections in different museums. Still another ontology of "activities and processes" contains a taxonomy of concepts such as "wedding" and "fishing". It is used to provide the end-user with an event-based view to cultural artifacts by associating them with corresponding events through annotations and logical rules. Each object's metadata and annotations are given in an RDF card, that points to different classes and instances of the ontologies by the respective URIs through RDF properties. Some of the properties in an RDF card have literal values, and some point to resources by using URIs.</p><p>The created HTML site consists of some 1200 resource web pages (RPage) describing objects in the museum's collection database, pages indexing the contents along different classifications, and a short user's guide. On the left in figure <ref type="figure" target="#fig_1">2</ref>, three frames containing indices for the underlying content are seen. The alphabetical index ("Aakkostettu hakemisto") contains links to the RPages in alphabetical order. By selecting a link, the respective RPage is shown on the right. In figure <ref type="figure" target="#fig_1">2</ref>, the user has selected a link to an RPage depicting perfume bottles. Before making a selection, the user's guide was shown in the same frame. The classified index ("Hakemisto aiheittain") is based on the RDFS taxonomy of the underlying cultural MAO ontology <ref type="bibr" target="#b7">[8]</ref> that was used when creating the collection metadata. When selecting a concept, the rightmost frame shows links to its subconcepts together with links to RPages whose objects are directly related to the concept. By selecting a subconcept link there, the taxonomy can be browsed further downward; by selecting a link to an RPage, the corresponding collection object with its metadata can be viewed in the frame. The third index "Hakemisto tapahtumittain" classifies the collection objects by associating them with the different events, processes or activities in which the objects are used or otherwise related to.</p><p>By using the indices, the user can find collection objects of interest. An alternative way is to use a conventional search engine. In the upper right corner of figure 2 a form for using Google to search for the pages in the repository is seen. The hit list will be shown in the rightmost frame.</p><p>After finding an PRage of interest, the collection can be browsed by using the semantic links generated between related collection items. For example, in figure 2 links to objects manufactured at the same location, objects of similar material etc. can be clicked. The semantic links are generated based on the underlying ontologies, metadata, and logical recommendation rules.</p><p>The museum can publish the content by just copying the pages into a public HTML directory. This is of practical im- portance, since museums typically do not have competent IT personnel, servers, and resources to create and maintain semantic portals of their own. To sum up, the output of SWeHG is a semantically linked space of HTML pages of the following kind: 1) Resource pages (RPage) depict selected resources with their metadata. 2) Index pages (IPage) classify RPages along conceptual hierarchical classifications, that will be called facets or views <ref type="bibr" target="#b10">[11]</ref>. By using IPages, RPages can be found along different facets. 3) A home page (HPage) defines the entrance page to the HTML repository. In our example, the data entries are collection objects with their metadata. On the right, the HPage has links to various IPages classifying the underlying RPages that are related with each other by semantic links.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Specifying the Transformation</head><p>The transformation is based on descriptions on two levels: 1) The layout of the HTML pages is described on the HTML level by templates using custom tags. 2) The semantics of the tags is defined on the RDF level in terms of logical rules based on the input RDF(S) content. The idea is that an HTML designer can design the layout of the page repository to be generated by using tags without knowing details of the underlying RDF structures, RDFS ontologies, and Prolog programming. RDF(S) related knowledge as well as programming capability in Prolog is needed only for the system programmer when defining the tags. The same tag definitions can be re-used in applications conforming to similar ontological schemas.</p><p>SWeHG provides the HTML designer with three major tags: getProperty, getLinks, and getView. The tag &lt;getProperty name= &gt; is used for rendering a label related to the resource underlying an RPage. For example, the metadata property values of the bottles and the photo in figure <ref type="figure" target="#fig_1">2</ref> are rendered in this way. The relation can be specified by the system programmer on the RDF level freely by a binary logical predicate.</p><p>The tag &lt;getLinks&gt; is used for rendering links between RPages. For example, the tag &lt;swehg:getLinks name="SameLocation" listType="ul" listStyle="text-size: 10;"/&gt; could expand into the following HTML code linking photographs taken at the same location:</p><p>&lt;ul style="text-size: 10;"&gt; &lt;li&gt;&lt;a href="entry.Mediacard_00071.html"&gt; View from Eiffel-tower&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="entry.Mediacard_00143.html"&gt; Cafe Parisienne&lt;/a&gt;&lt;/li&gt; ...</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&lt;/ul&gt;</head><p>On the RDF level, the criterion SameLocation for the linkage could be defined by the predicate below 8 . It associates the attribute SameLocation with the HTML link label 'Same Place' and the predicate photosWithSame-Location defining the link relation. The tag &lt;getView&gt; renders into a hierarchical index-like view of category resources used in IPages. Each category is associated with a set of subcategories and additional individuals of the categories. A view is defined by specifying 1) the root resource selector, 2) a binary subcategory relation predicate, and 3) a binary relation predicate that maps the hierarchy categories with the individuals used as leaves in the view. For example, the tag &lt;swehg:getView roots="buildings" branches="subclass" leaves="photoOf" listType="ul" /&gt; expands recursively into a hierarchical unordered tree (ul), where the leaves are links to photo record resources related to different building categories. The predicate definitions defining the meaning of the attribute values can be, for example, the following: buildings(URI) :rdf(URI, rdf:type, 'http://some.org#building'). subclass(SubCategory, SuperCategory) :rdf(SubCategory, rdfs:subClassOf, SuperCategory).</p><p>8 The examples are presented in SWI-Prolog (http://www.swiprolog.org) syntax. Here RDF triples are presented as rdf(Subject, Predicate, Object). Underscore "_" is an unnamed variable.</p><p>photoOf(Class, Record) :rdf(Instance, rdf:type, Class), rdf(Record, dc:subject, Instance).</p><p>Here buildings selects the class building as the view root, and the hierarchy is expanded along the rdfs:subClassOf property. The photoOf predicate relates each building type ¡ of this tree with a set of photo record resources which are used as the leaf categories of ¡ . These are rendered as HTML links to the corresponding RPages. The tag definitions could also be much more complex than this, depending on the structure of the RDF(S) repository, and the desired output. The view expansion into HTML can be controlled with the help of additional tag attributes for, e.g., ordering the categories.</p><p>The following is an example of a complete RPage template. It could be used for rendering the images using the HTML img-tag and links to related RPages: &lt;swehg:template selector="photo"&gt; &lt;html&gt; &lt;body&gt; &lt;h2&gt;&lt;swehg:getProperty name="Title_Of_Photo"/&gt;&lt;/h2&gt; &lt;p&gt;&lt;img src="&lt;swehg:getProperty name="PhotoURL"/&gt;" /&gt;&lt;/p&gt; &lt;h3&gt;Photos from the same place:&lt;/h3&gt; &lt;swehg:getLinks predicate="sameLocation" listType="ul"/&gt; &lt;/body&gt; &lt;/html&gt; &lt;/swehg:template&gt;</p><p>The tag attribute selector in the tag &lt;swehg:template&gt; tells the criterion for selecting context resources from the RDF repository. Each context resource will have an RPage of their own on the HTML level. The attribute value, here photo, is the name of a unary Prolog predicate called selector that should evaluate true for context resource URIs.</p><p>An example of a complete IPage template is given below using the view definitions above: &lt;swehg:template&gt; &lt;html&gt; &lt;body&gt; &lt;h1&gt;Building index&lt;/h1&gt; &lt;swehg:getView roots="buildings" branches="subclass" leaves="photoOf" orderby="order_alphabetically" listType="ul"/&gt; &lt;/body&gt; &lt;/html&gt; &lt;/swehg:template&gt;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Web Site Generation</head><p>The process for transforming an RDF(S) repository into HTML pages is defined by the algorithms 1 and 2. The input of the procedure is a set of HTML templates, and an RDF(S) repository. The output is an HTML page repository conforming to the templates. The transformation is based on a set of logical rules for selectors, properties, links, and views.</p><p>The pages are generated using the HTML templates one after another. If a template is associated with a selector, then it is expanded into a set of RPages corresponding to the selected context resources, else it is expanded once without a reference to a context resource. In the latter case, the HPage and IPages are created. When generating an HTML page, the tags are expanded into HTML in the ways described in the previous section. The main program is a Perl script which first builds an XSLT 9 template out of the HTML templates using the module "Template processor". This module also writes out a set  of "Processing instructions" into a separate Prolog source code file. These instructions link template tags with the Prolog predicates used in them as attribute values. The module "XML page generator" is a Prolog program that applies the predicates used in the HTML tags with respect to the RDF repository according to the Processing instructions. The result is a set of XML files describing the page contents. These XML files are then transformed using Apache Xalan <ref type="foot" target="#foot_7">10</ref> and with the help of the XSLT templates generated earlier into the final HTML pages.</p><p>The intermediate XML files in figure <ref type="figure" target="#fig_5">4</ref> are also used as a basis for the "Linkage analyzer" module that tries to identify the following potential problems: Self loops (a link that points to the page itself), Bad links (link pointing to a non existing page), Dead ends (an RPage with no outbound links), No way in (an RPage with no inbound links from any RPages or IPages), Not in index (an RPage with no inbound links from any IPage), and Unused rules (rules that are newer referred to when generating the HTML repository). The analysis results are represented as HTML pages. This helps the designer in debugging the specifications.</p><p>Figure <ref type="figure" target="#fig_8">5</ref> depicts a portion of the result from the analyzer.</p><p>On this page the number of in-coming and out-going links can be seen for each RPage together with a status explanation. The analyzer has found out that the page with label "Aikaisempien yleisten ..." is not connected with any other page or index. Furthermore, the page "Airueet" has one incoming and two outgoing links but was not included in any index. This kind of connectivity information is vital when debugging the logical rules that produce the HTML pages.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Discussion</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.">Benefits and Limitations</head><p>Our initial experiences indicate that the presented RDF to HTML transformation method is feasible. HTML templates can be created fairly easily and can be adapted to different RDF repositories. Moreover, changes in ontology versions do not affect the usage of the templates on the HTML level in any way. The idea of using logic and Prolog for defining the semantics of the tags seems powerful. Complicated semantic link relations and views can be defined and modified easily thanks to the declarative nature of logic programming. By using generic rules it is possible, in principle, to create tag definitions that will apply to any RDF repository. In contrast to view-based search systems, such as <ref type="bibr" target="#b10">[11,</ref><ref type="bibr" target="#b4">5]</ref>, the views are projected from the RDF(S) ontologies. The main benefit is that arbitrary mappings between view categories and data resources can be flexibly defined. The system infers the mapping between views and resources which gives it an "intelligent" flavor. Furthermore, the HTML pages are linked semantically with each other according to the ontologies, metadata, and rule base used. To the end-user, the underlying hidden associations between collection objects is a most interesting aspect of cultural collections. The nature of the associations can be explained to the user by the labels of the links.</p><p>The tag definitions are not application specific, and can be used also in different applications that use the same RDF(S) content. For example, we could use the linkage rules, the selector rules, and the rules generating the views of the indices of the "Espoo City Museum on the Semantic Web" developed originally for a semantic portal <ref type="bibr" target="#b5">[6]</ref>. On the other hand, the tag language of SWeHG is limited, and it can not be extended easily. Also, the set of different HTML outputs that the tags produce is limited at the moment. The output varies from simple strings to lists of links. In addition, SWeHG does not offer sufficient tools for testing the tag definitions before the actual transformation. A preview or debug function would be useful, because when the RDF(S) database is large, then the transformation process is long.</p><p>SWeHG generates static pages in a batch process before publishing them on the web. This approach has the following benefits when compared with dynamic semantic portals:</p><p>The page repository can be published easily by just copying it into a public HTML directory. SWeHG can be adapted to different contents conforming to different ontologies. The publication process is independent from semantic portal providers-no special server software is needed. The pages need no special maintenance. The static pages are indexed and searched for by general search engines. The pages can be viewed efficiently. Data security problems are minimal. The properties of the resulting HTML page set can be analyzed efficiently.</p><p>On the other hand, the static approach taken in SWeHG also has, of course, its limitations. First, static pages can not adapt their content dynamically to different user or patterns of usage. Second, dynamic systems can be connected more easily with other services providing additional functionality. Third, if the RDF repository, the rules, or the HTML templates change, the site has to be regenerated usually from scratch. Dynamic systems can adapt better to such changes. Fourth, if the RDF repository is large and many templates are used, then the number and size of generated pages can be large.</p><p>Clearly, both the dynamic and static approaches have their own virtues and application possibilities.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2.">Related Work</head><p>Logic and dynamic link creation on the semantic web have been discussed, e.g., in <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b1">2]</ref>. Our approach is different in it's use of HTML templates and Prolog for describing the static HTML output. In the RDF Twig tool<ref type="foot" target="#foot_8">11</ref> the RDF to HTML transformation is based on XSLT. A problem here is that an RDF graph can be serialized in many ways in XML. Different applications may produce different XML serializations of the same RDF graph, and thus a number of XSLT templates would have to be written for a single graph. In our approach only actual changes in the graph structures are relevant, because in SWI-Prolog, by which we define the logical rules, the RDF graph is processed purely as triplets. In Spectacle<ref type="foot" target="#foot_9">12</ref> the RDF to HTML transformation is based on APIs. Then the user must write programs that use the API, and also an application server is needed. In contrast, our approach is based on tags, is declarative, and the result is a set of static pages whose linkage structure is inferred by logical linking predicates.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3.">Directions for Future Work</head><p>SWeHG is a research prototype. More work and testing is still needed in order to evaluate and enhance the usability and extendability of system in different applications. More work is also needed in optimizing the efficiency of the code and in providing better development tools for the HTML designer and system programmer using the system.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 .</head><label>1</label><figDesc>Figure 1. Rendering RDF(S) content as an HTML web site.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 .</head><label>2</label><figDesc>Figure 2. A photo exhibition generated with SWeHG.</figDesc><graphic coords="2,317.28,30.50,237.60,155.28" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 .</head><label>3</label><figDesc>Figure 3. Transforming an RDF repository into HTML pages.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 3</head><label>3</label><figDesc>Figure 3 depicts the RDF to HTML transformation. The RDF graph is on the left. Each ¢¡ corresponds to a resource corresponding to a data entry in the RDF repository.In our example, the data entries are collection objects with their metadata. On the right, the HPage has links to various IPages classifying the underlying RPages that are related with each other by semantic links.The transformation is based on descriptions on two levels: 1) The layout of the HTML pages is described on the HTML level by templates using custom tags. 2) The semantics of the tags is defined on the RDF level in terms of logical rules based on the input RDF(S) content. The idea is that an HTML designer can design the layout of the page repository to be generated by using tags without knowing details of the underlying RDF structures, RDFS ontologies, and Prolog programming. RDF(S) related knowledge as well as programming capability in Prolog is needed only for the system programmer when defining the tags. The same tag definitions can be re-used in applications conforming to</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head></head><label></label><figDesc>swehg_relation_rule( 'SameLocation', 'Same Place', photosWithSameLocation). photosWithSameLocation(Context, Target) :photo(Context), photo(Target), rdf(Context, _:place, Location), rdf(Target, _:place, Location), not(Context == Target).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 4 .</head><label>4</label><figDesc>Figure 4. Internal architecture of SWeHG.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Algorithm 1 :</head><label>1</label><figDesc>Figure 4  depicts the architecture of our implementation. The main program is a Perl script which first builds an XSLT9 template out of the HTML templates using the module "Template processor". This module also writes out a set</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head>9Algorithm 2 :</head><label>2</label><figDesc>http://w3.org/TR/xslt Algorithm: createHTMLpage Data: Template t, Context Resource r Result: HTML page String H = t; foreach Tag in H do h = executeRule(Tag.rulename, r); replace Tag in H with h; end return H; Algorithm createHTMLpage for rendering an HTML template. Tag.rulename returns the name of the rule, e.g., "getProperty".</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head>Figure 5 .</head><label>5</label><figDesc>Figure 5. An analysis page created by SWeHG.</figDesc><graphic coords="5,317.32,203.44,237.37,105.78" type="bitmap" /></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">http://www.w3.org/2001/sw/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">See, e.g., http://dmoz.org.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2">http://www.w3.org/RDF/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_3">http://www.w3.org/2001/sw/WebOnt/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_4">http://www.helsinki.fi/museo/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_5">The annotations also include other metadata, such as the photographer, free text descriptions, some technical information of the images, etc.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_6">The exhibition is on the web at http://www.cs.helsinki.fi/group/seco/swehg/ekmdemo/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="10" xml:id="foot_7">xml.apache.org/xalan-j/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="11" xml:id="foot_8">http:/rdftwig.sourceforge.net/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="12" xml:id="foot_9">http://www.aidministrator.nl/spectacle/</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>A. Valo contributed significantly to the implementation of SWeHG. Also M. Kiesilä, V. Komulainen, R. Köppä-Laitinen, and J. Muhonen participated in the implementation project. Our work was mainly funded by the National Technology Agency Tekes, Nokia Corp., TietoEnator Corp., the Espoo City Museum, the Foundation of the Helsinki University Museum, the National Board of Antiquities, and the Antikvaria-group of some 20 Finnish museums.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">The semantic web</title>
		<author>
			<persName><forename type="first">T</forename><surname>Berners-Lee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Hendler</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Lassila</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Scientific American</title>
		<imprint>
			<biblScope unit="volume">284</biblScope>
			<biblScope unit="issue">5</biblScope>
			<biblScope unit="page" from="34" to="43" />
			<date type="published" when="2001-05">May 2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Logic-based open hypermedia for the semantic web</title>
		<author>
			<persName><forename type="first">P</forename><surname>Dolong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Henze</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Neijdl</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Int. Workshop on Hypermedia and the Semantic Web, Hypertext 2003 Conference</title>
				<meeting>the Int. Workshop on Hypermedia and the Semantic Web, Hypertext 2003 Conference<address><addrLine>Nottinghan, UK</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<title level="m" type="main">editors. Weaving the Semantic Web</title>
		<author>
			<persName><forename type="first">D</forename><surname>Fensel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Hendler</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Lieberman</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Wahlster</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2002">2002</date>
			<publisher>The MIT Press</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Conceptual open hypermedia = the semantic web?</title>
		<author>
			<persName><forename type="first">C</forename><surname>Goble</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Bechhofer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Carr</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>De Roure</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Hall</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the WWW2001, Semantic Web Workshop</title>
				<meeting>the WWW2001, Semantic Web Workshop<address><addrLine>Hongkong</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Finding the flow in web site search</title>
		<author>
			<persName><forename type="first">M</forename><surname>Hearst</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Elliott</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>English</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Sinha</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Swearingen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K.-P</forename><surname>Lee</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">CACM</title>
		<imprint>
			<biblScope unit="volume">45</biblScope>
			<biblScope unit="issue">9</biblScope>
			<biblScope unit="page" from="42" to="49" />
			<date type="published" when="2002">2002</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Finnish Museums on the Semantic Web. User&apos;s perspective on museumfinland</title>
		<author>
			<persName><forename type="first">E</forename><surname>Hyvönen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Junnila</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Kettula</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Mäkelä</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Saarela</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Salminen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Syreeni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Valo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Viljanen</surname></persName>
		</author>
		<ptr target="http://www.archimuse.com/mw2004/papers/hyvonen/hyvo-nen.html" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of Museums and the Web 2004 (MW2004)</title>
				<meeting>Museums and the Web 2004 (MW2004)<address><addrLine>Arlington, Virginia, USA</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Ontogator: combining view-and ontology-based search with semantic browsing</title>
		<author>
			<persName><forename type="first">E</forename><surname>Hyvönen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Saarela</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Viljanen</surname></persName>
		</author>
		<ptr target="http://www.cs.helsinki.fi/u/eahyvone/publications/xmlfin-land2003/yomXMLFinland2003.pdf" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the XML Finland 2003 conference</title>
				<meeting>the XML Finland 2003 conference<address><addrLine>Kuopio, Finland</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">A content creation process for the Semantic Web</title>
		<author>
			<persName><forename type="first">E</forename><surname>Hyvönen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Salminen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Kettula</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Junnila</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceeding of OntoLex 2004: Ontologies and Lexical Resources in Distributed Environments</title>
				<meeting>eeding of OntoLex 2004: Ontologies and Lexical Resources in Distributed Environments<address><addrLine>Lisbon, Portugal</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2004-05-29">2004. May 29</date>
		</imprint>
	</monogr>
	<note>forthcoming</note>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Publishing semantic web content as semantically linked HTML pages</title>
		<author>
			<persName><forename type="first">E</forename><surname>Hyvönen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Valo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Viljanen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Holi</surname></persName>
		</author>
		<ptr target="http://www.cs.helsinki.fi/u/eahyvone/publications/xmlfinland2003/swehg_article_xmlfi2003.pdf" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of XML Finland 2003</title>
				<meeting>XML Finland 2003<address><addrLine>Kuopio, Finland</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">L</forename><surname>Leskinen</surname></persName>
		</author>
		<title level="m">Museoalan asiasanasto. Museovirasto</title>
				<meeting><address><addrLine>Helsinki, Finland</addrLine></address></meeting>
		<imprint>
			<date type="published" when="1997">1997</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title level="m" type="main">The key role of classification and indexing in view-based searching</title>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">S</forename><surname>Pollitt</surname></persName>
		</author>
		<ptr target="http://www.ifla.org/IV/ifla63/63polst.pdf" />
		<imprint>
			<date type="published" when="1998">1998</date>
			<pubPlace>, UK</pubPlace>
		</imprint>
		<respStmt>
			<orgName>University of Huddersfield</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Technical report</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
