Changeset 2846
- Timestamp:
- 04/29/13 07:43:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo_importer/src/main/resources/cmdi2xhtml.xsl
r2768 r2846 7 7 version="2.0" 8 8 xpath-default-namespace="http://www.clarin.eu/cmd/"> 9 <!-- 10 <!DOCTYPE html> 11 --> 9 12 10 13 <xsl:output 11 14 method="html" 12 15 encoding="UTF-8" 16 doctype-system="about:legacy-compat" 13 17 indent="yes" 14 18 cdata-section-elements="td"/> 15 19 16 20 <xsl:param name="prune_Components_branches_without_text_values" as="xs:boolean" select='false()'/> 17 <xsl:param name="termValue"/>18 21 19 22 … … 23 26 <ul> 24 27 <xsl:for-each select="$nodeset/element()"> 25 <!--fn:normalize-space(-->26 28 <xsl:variable name="subnodes_text" select="fn:normalize-space(fn:string-join(descendant-or-self::element()/text(), ''))" as="xs:string+"/> 27 29 <xsl:if test="not($subnodes_text = '' and $prune_Components_branches_without_text_values)"> 28 30 <xsl:variable name="nchildren" select="fn:count(child::element())"/> 29 <li> 30 <code> 31 <li> 32 33 <code class="node"> 31 34 <xsl:value-of select="fn:concat(local-name(), ' ')"/> 32 35 <xsl:if test="count(@*) > 0"> … … 41 44 <xsl:choose> 42 45 <xsl:when test="$nchildren = 0"> 43 < br /><br />46 <!--<br /><br />--> 44 47 <div class="Component_tree_node_content"> 45 <sample><xsl:value-of select="self::element()"/></sample> 48 <xsl:variable name="leaf_value" select="self::element()" as="xs:string"/> 49 <xsl:variable name="HTTP_URL" select="starts-with($leaf_value, 'http://')" as="xs:boolean"/> 50 <code class="leaf"> 51 <xsl:choose> 52 <xsl:when test="$HTTP_URL"> 53 <a href="{$leaf_value}"><xsl:value-of select="$leaf_value"/></a> 54 </xsl:when> 55 <xsl:otherwise> 56 <xsl:value-of select="$leaf_value"/> 57 </xsl:otherwise> 58 </xsl:choose> 59 </code> 46 60 </div> 47 61 </xsl:when> … … 54 68 </xsl:otherwise> 55 69 </xsl:choose> 56 </li> 70 71 </li> 57 72 </xsl:if> 58 73 </xsl:for-each> 59 74 </ul> 60 75 </xsl:template> 61 76 77 62 78 <xsl:template match="CMD"> 63 <!-- TODO <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">64 <meta charset="utf-8"/>65 <head>66 <title>CMDI collection "<xsl:value-of select="./Header/MdCollectionDisplayName" xmlns="cmd"/>"67 </title>68 <link rel="stylesheet" type="text/css" href="http://catalog.clarin.eu/ds/vlo/css/main.css"/>69 -->70 71 79 <style media="screen" type="text/css"> 72 80 <![CDATA[ … … 77 85 } 78 86 79 code87 .node 80 88 { 81 89 background-color: rgba(188, 205, 232, 0.8); … … 83 91 font-weight: bold; 84 92 padding: 5px; 85 } 93 /*float: left;*/ 94 } 95 96 .leaf 97 { 98 } 86 99 87 100 .Component_tree_node_content … … 90 103 border: 1px dotted red; 91 104 margin-top: 10px; 105 margin-left: 10px; 92 106 padding: 5px; 93 float: none; 94 display:table-cell; 107 display: inline-block; 108 /*float: left;*/ 109 /*display: table-cell;*/ 95 110 } 96 111 97 112 .attributes 98 { 113 { 99 114 display: inline-block; 100 115 font-style: italic; 101 116 font-weight: normal; 102 /* background-color: rgba(100, 201, 234, 0.4);*/117 /*background-color: rgba(100, 201, 234, 0.4);*/ 103 118 } 119 120 footer 121 { 122 border: 1px dotted; 123 } 104 124 105 125 address … … 111 131 ]]> 112 132 </style> 113 <!-- </head>114 <body> -->115 133 <article style="background-color:#EEEEEE"> 116 134 <div class="endgame"> … … 160 178 </p> 161 179 </div> 162 163 <!--164 <p>165 <h1>Journal file proxy list</h1>166 <xsl:for-each select="JournalFileProxyList"> </xsl:for-each>167 </p>168 169 <p>170 <h1>Resource relations</h1>171 <xsl:for-each select="Resources/ResourceRelationList/ResourceRelation"> </xsl:for-each>172 </p>173 -->174 180 175 181 <p> … … 177 183 <xsl:call-template name="Component_tree"/> 178 184 </p> 179 180 <!-- TODO<footer>181 <p>Created by <address class="author"> <xsl:value-of select="Header/MdCreator"/>182 </address> on <time datetime="{Header/MdCreationDate}">183 <xsl:value-of select="Header/MdCreationDate"184 /></time>185 <br />186 <small>Located at <a href="{Header/MdSelfLink}">187 <xsl:value-of select="Header/MdSelfLink"/></a>188 </small>189 <br />190 <small>Belongs to <xsl:value-of select="Header/MdCollectionDisplayName"191 />192 </small>193 <br />194 <xsl:variable name="resource_URL"195 select="fn:concat('http://catalog.clarin.eu/ds/ComponentRegistry?item=',Header/MdProfile)"/>196 <small>Based on <a href="{$resource_URL}"><xsl:value-of select="$resource_URL"/></a>197 </small>198 </p>199 </footer>-->200 185 </article> 201 <!--TODO </body>202 </html> -->203 204 186 </xsl:template> 205 187 </xsl:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.