[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Sat Jul 28 03:47:41 UTC 2007


gordonp
Fri Jul 27 23:47:41 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/resources
In directory dev.open-bio.org:/tmp/cvs-serv27070/src/main/ca/ucalgary/seahawk/resources

Modified Files:
	moby2HTML.xsl 
Log Message:
Added articleName support for moby URLs
moby-live/Java/src/main/ca/ucalgary/seahawk/resources moby2HTML.xsl,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/resources/moby2HTML.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/resources/moby2HTML.xsl	2007/06/16 00:28:57	1.3
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/resources/moby2HTML.xsl	2007/07/28 03:47:41	1.4
@@ -218,22 +218,17 @@
 
   <!-- Base Object class, has a namespace and ID. That's it. -->
   <xsl:template match="moby:Object | mobys:Object | Object" mode="elucidate">
-    <a href="http://moby/{@moby:namespace | @mobys:namespace | @namespace}?id={@moby:id | @mobys:id | @id}">ID <xsl:value-of select="@moby:namespace | @mobys:namespace | @namespace"/>:<xsl:value-of select="@moby:id | @mobys:id | @id"/> (<xsl:value-of select="@moby:articleName | mobys:articleName | @articleName"/>)</a><xsl:text> </xsl:text>
+    <a href="http://moby/{@moby:namespace | @mobys:namespace | @namespace}?id={@moby:id | @mobys:id | @id}&amp;name={@moby:articleName | @mobys:articleName | @articleName}">ID <xsl:value-of select="@moby:namespace | @mobys:namespace | @namespace"/>:<xsl:value-of select="@moby:id | @mobys:id | @id"/> (<xsl:value-of select="@moby:articleName | @mobys:articleName | @articleName"/>)</a><xsl:text> </xsl:text>
     <xsl:apply-templates select="moby:CrossReference | mobys:CrossReference | CrossReference" mode="elucidate"/>
   </xsl:template> <!-- end Object template -->
 
   <xsl:template match="moby:String | mobys:String | String" mode="elucidate">
     <xsl:variable name="xptr"><xsl:call-template name="getXPointer"/></xsl:variable>
-    <a href="{$sourceURL}#{$xptr}"><xsl:if test="string-length(@moby:namespace | @mobys:namespace | @namespace)">ID <xsl:value-of select="@moby:namespace | @mobys:namespace | @namespace"/>:</xsl:if><xsl:if test="string-length(@moby:id | @mobys:id | @id)"><xsl:value-of select="@moby:id | @mobys:id | @id"/> </xsl:if>(<xsl:value-of select="@moby:articleName | @mobys:articleName | @articleName"/>)</a>: <xsl:value-of select="."/><br/>
+    <a href="{$sourceURL}#{$xptr}">String <xsl:if test="string-length(@moby:namespace | @mobys:namespace | @namespace)"><xsl:value-of select="@moby:namespace | @mobys:namespace | @namespace"/>:</xsl:if><xsl:if test="string-length(@moby:id | @mobys:id | @id)"><xsl:value-of select="@moby:id | @mobys:id | @id"/> </xsl:if>(<xsl:value-of select="@moby:articleName | @mobys:articleName | @articleName"/>)</a>: <xsl:value-of select="."/><br/>
     <xsl:apply-templates select="moby:CrossReference | mobys:CrossReference | CrossReference" mode="elucidate"/>
   </xsl:template> <!-- end String template -->
 
-  <!-- objects with "text" in their name are assumed to be subclasses of text-formatted, so show their contents
-  <xsl:template match="moby:*[contains(translate(local-name(.), 'T', 't'), 'text')]" mode="elucidate">
-    <xsl:value-of select="@moby:articleName | @articleName"/> <pre><xsl:value-of select="."/></pre><br/>
-  </xsl:template>  end formatted text template -->
-
-  <xsl:template match="moby:Integer | mobys:Integer | Integer | moby:Float | mobys:Float | Float" mode="elucidate">
+  <xsl:template match="moby:Integer | mobys:Integer | Integer | moby:Float | mobys:Float | Float | moby:Boolean | mobys:Boolean | Boolean | moby:DateTime | mobys:DateTime | DateTime" mode="elucidate">
     <xsl:value-of select="@moby:articleName | @mobys:articleName | @articleName"/>: <xsl:value-of select="."/><br/>
   </xsl:template> <!-- end Integer template -->
 
@@ -255,8 +250,9 @@
   <!-- A collection is just provides an array facility in MOBY for Simples -->
 
   <xsl:template match="moby:Collection | mobys:Collection | Collection">
-    <xsl:variable name="xptr"><xsl:call-template name="getXPointer"/></xsl:variable>   
-    <a href="{$sourceURL}#{$xptr}">Collection</a> of <xsl:value-of select="count(moby:Simple | mobys:Simple | Simple)"/> data elements: <br/>
+    <xsl:variable name="xptr"><xsl:call-template name="getXPointer"/></xsl:variable>
+    <xsl:variable name="itemcount" select="count(moby:Simple | mobys:Simple | Simple)"/>
+      <a href="{$sourceURL}#{$xptr}">Collection</a> of <xsl:value-of select="$itemcount"/> data element<xsl:if test="$itemcount != 1">s</xsl:if> <br/>
     <ol>
     <xsl:for-each select="moby:Simple | mobys:Simple | Simple">
       <li><xsl:apply-templates select="."/></li>




More information about the MOBY-guts mailing list