Index: /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/about.xsl
===================================================================
--- /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/about.xsl	(revision 28587)
+++ /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/about.xsl	(revision 28588)
@@ -124,8 +124,5 @@
 
 
-
-
-
-   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"><xsl:text> </xsl:text></script>
 
     <script type="text/javascript" src="https://www.google.com/jsapi"><xsl:text> </xsl:text></script>
@@ -139,4 +136,5 @@
       sgvizler.option.namespace.salami = 'http://nema.lis.illinois.edu/salamiEndpoint/';
       
+      sgvizler.option.namespace.dc = 'http://purl.org/dc/elements/1.1/';
       sgvizler.option.namespace.gsembedded = 'http://greenstone.org/gsembedded#'
       sgvizler.option.namespace.greenstonedata = 'http://localhost:3030/greenstone/data/'
@@ -145,12 +143,12 @@
     </script>
 
-<div id="sgvzl_example"
+
+<div id="sgvzl_example1"
       data-sgvizler-endpoint="http://localhost:3030/greenstone/query"
 
       data-sgvizler-chart="gPieChart"
-      XXdata-sgvizler-chart="gBarChart"
       data-sgvizler-loglevel="2"
       data-sgvizler-chart-options="title=Songs by ID3.Genre"
-      style="width:100%; height:300px;">
+      style="width:900px; height:400px; margin-left: auto; margin-right: auto">
   <xsl:attribute name="data-sgvizler-query">
      SELECT (?genreTag) (COUNT(?genreTag) AS ?freqCount)
@@ -168,4 +166,7 @@
 
 
+
+
+
 	</xsl:template>
 
Index: /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/classifier.xsl	(revision 28588)
+++ /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/classifier.xsl	(revision 28588)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util gsf">
+	
+	<!-- use the 'main' layout -->
+	<xsl:import href="layouts/main.xsl"/>
+	<xsl:import href="classifiertools.xsl"/>
+
+	<!-- set page title -->
+	<xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
+
+	<!-- set page breadcrumbs -->
+	<xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/><gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
+
+	<!-- optional cgi-params for links to document pages -->
+	<xsl:variable name="opt-doc-link-args"></xsl:variable>
+
+
+	<xsl:template name="out-of-flow-viz">
+
+
+<!--
+	  <div style="position: absolute; left: 280px; top: 120px;">
+-->
+	  <div style="position: absolute; left: 530px; top: 120px; z-index: 2">
+
+	    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"><xsl:text> </xsl:text></script>
+	    
+	    <script type="text/javascript" src="https://www.google.com/jsapi"><xsl:text> </xsl:text></script>
+	    <script type="text/javascript" id="sgvzlr_script" src="http://sgvizler.googlecode.com/svn/release/0.5/sgvizler.js"><xsl:text> </xsl:text></script>
+	    
+	    <script type="text/javascript">
+	      <xsl:text disable-output-escaping="yes">
+		sgvizler.option.namespace.mo ='http://purl.org/ontology/mo/';
+		sgvizler.option.namespace.salami = 'http://nema.lis.illinois.edu/salamiEndpoint/';
+		
+		sgvizler.option.namespace.dc = 'http://purl.org/dc/elements/1.1/';
+		sgvizler.option.namespace.gsembedded = 'http://greenstone.org/gsembedded#'
+		sgvizler.option.namespace.greenstonedata = 'http://localhost:3030/greenstone/data/'
+		$(document).ready(sgvizler.go());
+	      </xsl:text>
+	    </script>
+	    
+	    <div style="position: absolute; left: 0px; top: 0px;">
+	      <div id="sgvzl-artist-related-tags"
+		   data-sgvizler-endpoint="http://localhost:3030/greenstone/query"
+		   
+		   data-sgvizler-chartXX="gTreeMap"
+		   data-sgvizler-chartYY="gPieChart"
+		   data-sgvizler-chart="gBarChart"
+		   data-sgvizler-loglevel="2"
+		   data-sgvizler-chart-optionsYY="title=Songs by dc.Subject^artist-related-tag"
+		   data-sgvizler-chart-options="title=Songs by dc.Subject^artist-related-tag|vAxis.title=Number of Songs"
+		   style="position: relative; width:400px; height:760px;">
+		<xsl:attribute name="data-sgvizler-query">
+		  SELECT (?artistRelatedTag) (COUNT(?artistRelatedTag) AS ?freqCount)
+		  WHERE {
+		  GRAPH &lt;http://localhost:3030/greenstone/data/linkeddata-my-ipod&gt;  {
+		    ?s &lt;http://purl.org/dc/elements/1.1/Subject.artistrelatedtag&gt; ?artistRelatedTag .
+		    }
+		  } 
+		  GROUP BY ?artistRelatedTag
+                  ORDER BY DESC(?freqCount) LIMIT 25
+		  </xsl:attribute><xsl:comment>need filler to spot Greenstone's XSLT collapsing this div</xsl:comment>
+	      </div>
+	    </div>
+	    
+	  </div>
+	 
+
+	</xsl:template>
+
+
+	<!-- the page content -->
+	<xsl:template match="/page/pageResponse">
+
+
+		<xsl:call-template name="classifierPre"/>
+		
+		<script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript">$(window).load(openStoredClassifiers);</script>
+		
+		<!-- this right sidebar -->
+		<xsl:if test="$berryBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
+
+			<div id="rightSidebar">
+				<xsl:if test="$berryBasketOn">
+					<!-- show the berry basket if it's turned on -->
+					<gslib:berryBasket/>
+					<xsl:text> </xsl:text>
+				</xsl:if>
+
+				<xsl:if test="$documentBasketOn">
+					<gslib:documentBasket/>
+					<xsl:text> </xsl:text>
+				</xsl:if>
+
+			</div>
+		</xsl:if>
+
+
+		<!--
+			show the clasifier results - 
+			you can change the appearance of the results by editing
+			the two templates at the bottom of this file
+		-->
+		<div id="results">
+
+		  <xsl:if test="/page/pageRequest/paramList/param[@name='cl']/@value='CL5'">
+		    <xsl:call-template name="out-of-flow-viz"/>
+		  </xsl:if>
+
+		  <div style="position: relative; z-index: 1">
+			<xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
+			<xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
+
+			<xsl:call-template name="classifierResultsPre"/>
+			
+			<xsl:apply-templates select="classifier">
+				<xsl:with-param name="collName" select="$collName"/>
+				<xsl:with-param name="serviceName" select="$serviceName"/>
+			</xsl:apply-templates>
+		  </div>
+
+		</div>
+
+		<div class="clear"><xsl:text> </xsl:text></div>
+	</xsl:template>
+
+</xsl:stylesheet>  
Index: /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/document.xsl
===================================================================
--- /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/document.xsl	(revision 28587)
+++ /main/trunk/model-sites-dev/multimodal-mdl/collect/linkeddata-my-ipod/transform/pages/document.xsl	(revision 28588)
@@ -151,6 +151,13 @@
       <div class="documenttext">
 	<center>
-	  <xsl:call-template name="plainoldMetadataBlock" />
+	  <xsl:call-template name="plainold-metadata-block" />
 	</center>
+
+	<br />
+
+	<center>
+	  <xsl:call-template name="discovery-block" />
+	</center>
+
       </div>
 
@@ -191,5 +198,5 @@
 
     <xsl:template name="choose-music-artist">
-      
+
       <gsf:choose-metadata>
 	<gsf:metadata name="dc.Creator"/>
@@ -199,11 +206,21 @@
 	<gsf:default>Unknown</gsf:default>
       </gsf:choose-metadata>
+
     </xsl:template>    
 
 
-  <xsl:template name="plainoldMetadataBlock">
+  <xsl:template name="plainold-metadata-block">
     
     <xsl:variable name="httpCollection"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/></xsl:variable>
     <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
+
+      <style>
+	<xsl:text disable-output-escaping="yes">
+	  a.external {
+	    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAAAAAElFTkSuQmCC") no-repeat scroll right center rgba(0, 0, 0, 0);
+	    padding-right: 13px;
+	  }
+	</xsl:text>
+      </style>
     
       <table class="metadata-stripes">
@@ -214,5 +231,10 @@
 	    </td>
 	    <td>
-	      <xsl:call-template name="choose-music-title"/>
+	      <a class="external" target="#mbsearch">
+		<xsl:attribute name="href">
+		  http://musicbrainz.org/search?query=<xsl:call-template name="choose-music-title"/>&amp;type=recording&amp;limit=5&amp;method=indexed
+		</xsl:attribute>
+		<xsl:call-template name="choose-music-title"/>
+	      </a>
 	    </td>
 	  </tr>
@@ -252,9 +274,4 @@
 
 
-
-
-
-
-
   <!-- *** -->
   <!-- * Discovery -->
@@ -310,5 +327,7 @@
       <gsf:metadata name="dc.Identifier.echonestsongid"/>
     </xsl:variable>
-    
+
+    <section itemscope="itemscope">
+
       <table class="metadata-stripes">
 	<tbody>
@@ -324,15 +343,32 @@
 	  <tr>
 	    <td>Album Title</td>
-	    <td><gsf:metadata name="dc.Title.albumtitle"/></td>
+	    <td>
+		<gsf:metadata name="dc.Title.albumtitle"/>
+	    </td>
 	  </tr>
 	  
 	  <tr>
 	    <td>Artist</td>
-	    <td><gsf:metadata name="dc.Creator"/></td>
+	    <td>
+	      <span itemtype="http://musicbrainz.org/artist" 
+		    itemid="http://musicbrainz.org/artist/{$musicbrainzartistid}"
+		    itemprop="name">
+		<gsf:metadata name="dc.Creator"/>
+	      </span>		
+	    </td>
 	  </tr>
 	  
 	  <tr valign="top">
 	    <td>Artist Summary</td>
-	    <td><i><gsf:metadata name="LastFM.LastFMArtistWikiSummary"/></i></td>
+	    <td>
+	      <i>
+		<gsf:script>
+		  var summary = gs.documentMetadata["LastFM_LastFMArtistWikiSummary"];
+		  
+		  document.write(summary.replace("\n","&lt;br /&gt;"));
+
+		</gsf:script>
+	      </i>
+	    </td>
 	  </tr>
 	  
@@ -381,11 +417,12 @@
 	      -->
 
-	      <table>
+	      <table style="width: 100%;">
 		<tr>
-		  <td>
+		  <td style="width: 200px;">
 		    MusicBrainz song id: 
 		  </td>
 		  <td>
-		    <a href="http://dbtune.org/musicbrainz/resource/track/{$musicbrainzsongid}" target="#musicbrainz">
+
+		    <a href="http://musicbrainz.org/track/{$musicbrainzsongid}" target="#musicbrainz" class="external">
 		      <xsl:copy-of select="$musicbrainzsongid"/>
 		    </a>
@@ -398,5 +435,8 @@
 		  </td>
 		  <td>
-		    <a href="http://dbtune.org/musicbrainz/resource/record/{$musicbrainzalbumid}" target="#musicbrainz">
+<!--
+		    <a href="http://dbtune.org/musicbrainz/resource/record/{$musicbrainzalbumid}" target="#musicbrainz" class="external">
+-->
+		    <a href="http://musicbrainz.org/release/{$musicbrainzalbumid}" target="#musicbrainz" class="external">
 		      <xsl:copy-of select="$musicbrainzalbumid"/>
 		    </a>
@@ -409,24 +449,35 @@
 		  </td>
 		  <td>
-		    <a href="http://dbtune.org/musicbrainz/page/artist/{$musicbrainzartistid}" target="#musicbrainz">
+		    <a href="http://musicbrainz.org/artist/{$musicbrainzartistid}" target="#musicbrainz" class="external">
 		      <xsl:copy-of select="$musicbrainzartistid"/>
 		    </a>
 		  </td>
 		</tr>
+
+
+		<gsf:switch>
+		  <gsf:metadata name="$echonestsongid"/>
+		  <gsf:when test="exists">
+
+		    <tr>
+		      <td>
+			EchoNest song id:
+		      </td>
+		      <td>
+			<a href="http://developer.echonest.com/api/v4/song/profile?api_key=8WNR9XTGCODO9G4YG&amp;format=xml&amp;id={$echonestsongid}" target="#echonestsongid" class="external">
+			  <xsl:copy-of select="$echonestsongid"/>
+			</a>
+		      </td>
+		    </tr>
+		  </gsf:when>
+		</gsf:switch>
+
 		<tr>
 		  <td colspan="2">	      
-		    <a href="{$lastfmtrackurl}" target="#lastfm">
-		      <xsl:copy-of select="$lastfmtrackurl"/>
-		    </a>
-		  </td>
-		</tr>
-		<tr>
-		  <td>
-		    EchoNest song id:
-		  </td>
-		  <td>
-		    <a href="{$echonestsongid}" target="#echonestsongid">
-		      <xsl:copy-of select="$echonestsongid"/>
-		    </a>
+		    <i>
+		      <a href="{$lastfmtrackurl}" target="#lastfm" class="external">
+			<xsl:copy-of select="$lastfmtrackurl"/>
+		      </a>
+		    </i>
 		  </td>
 		</tr>
@@ -439,4 +490,5 @@
 	</tbody>
       </table>
+    </section>
   </xsl:template>
 
