Changeset 794
- Timestamp:
- 10/16/10 12:48:18 (14 years ago)
- Location:
- MDService2/trunk/MDService2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/WebContent/scripts/mdservice2_ui.js
r793 r794 10 10 current:''}, 11 11 terms: { 12 base_uri: "/MDService2/ model/",13 current:' Components'},12 base_uri: "/MDService2/terms/", 13 current:'all'}, 14 14 terms_autocomplete: { 15 15 base_uri: "/MDService2/terms/", -
MDService2/trunk/MDService2/build.properties
r560 r794 26 26 build.home=./build 27 27 dist.home=./dist 28 #deploy.dir = C:/apps/ApacheTomcat/webapps29 deploy.dir = C:/apache-tomcat-6.0.26/webapps28 deploy.dir = C:/apps/apache-tomcat/webapps 29 #deploy.dir = C:/apache-tomcat-6.0.26/webapps 30 30 31 31 -
MDService2/trunk/MDService2/src/mdservice.properties
r775 r794 31 31 xsl.model2htmlselect = model2view.xsl 32 32 xsl.terms2htmlselect = terms2view.xsl 33 xsl.terms2htmllist = terms2view.xsl 34 xsl.terms2autocomplete = terms2view.xsl 33 35 xsl.terms2htmlpage = terms2view.xsl 34 36 xsl.terms2htmltable = terms2view.xsl 35 xsl.terms2autocomplete = terms2view.xsl 37 36 38 xsl.comp2htmllist = comp2view.xsl 37 39 xsl.comp2htmldetail = comp2view.xsl … … 50 52 xsl.collection2html = collection2view.xsl 51 53 xsl.complist2xmlresolved = complist_resolved.xsl 52 xsl.terms2htmllist = complist2terms.xsl 54 53 55 xsl.terms2txt = complist2termstxt.xsl 54 56 xsl.xml2json = xml2json.xsl -
MDService2/trunk/MDService2/src/xsl/cmd_commons.xsl
r789 r794 148 148 <!-- Stop includes --> 149 149 150 <!-- generic templates --> 151 <xsl:template name="attr-detail-div" > 152 <div class="detail"> 153 <xsl:for-each select="@*" > 154 <div class="cmds-elem-prop"><span class="label"><xsl:value-of select="name()" />: </span> 155 <span class="value"><xsl:value-of select="." /></span></div> 156 </xsl:for-each> 157 </div> 158 </xsl:template> 150 159 151 160 <!-- should be obsoleted by model2matrix.xsl 152 161 but it is not.. 162 --> 153 163 <xsl:variable name="term_matrix" > 154 164 … … 163 173 164 174 </xsl:variable> 165 175 <!-- 166 176 <xsl:template match="Term" mode="matrix" > 167 177 … … 294 304 </xsl:function> 295 305 306 <!-- previously known as comppath --> 296 307 <xsl:function name="my:context" > 297 308 <xsl:param name="child" /> -
MDService2/trunk/MDService2/src/xsl/comp2view.xsl
r649 r794 185 185 <xsl:variable name="detail_uri" select="if(@ComponentId) then concat($detail_comp_prefix, my:extractID(@ComponentId)) else concat($detail_profile_prefix, my:extractID(parent::CMD_ComponentSpec/Header/ID))" /> 186 186 <li><a href="{$detail_uri}" ><xsl:value-of select="@name" /></a> 187 <span class="data comppath" ><xsl:value-of select="my:co mppath(.)" /></span>187 <span class="data comppath" ><xsl:value-of select="my:context(.)" /></span> 188 188 189 189 <span class="cmd cmd_filter"><xsl:text> </xsl:text></span><span class="cmd cmd_detail" ><xsl:text> </xsl:text></span> … … 202 202 <xsl:template match="CMD_Element" mode="list"> 203 203 <li><xsl:value-of select="@name" /> 204 <span class="data comppath" ><xsl:value-of select="my:co mppath(.)" /></span>204 <span class="data comppath" ><xsl:value-of select="my:context(.)" /></span> 205 205 <span class="cmd cmd_filter"><xsl:text> </xsl:text></span><span class="cmd cmd_detail" ><xsl:text> </xsl:text></span> 206 206 </li> -
MDService2/trunk/MDService2/src/xsl/model2matrix.xsl
r789 r794 160 160 <xsl:param name="model_termsets" /> 161 161 <xsl:copy> 162 <xsl:attribute name="path" select="concat(ancestor::Termset/@id,':',@name)"></xsl:attribute> 162 163 <xsl:copy-of select="*|@*"></xsl:copy-of> 163 164 <xsl:variable name="matching_model_terms" select="$model_termsets//Term[@datcat=current()/@datcat]" /> … … 177 178 </xsl:template> 178 179 179 <xsl:template match="Term " mode="resolve-relcat" >180 <xsl:template match="Term[@type='rel']" mode="resolve-relcat" > 180 181 <xsl:param name="datcat_termsets" /> 181 182 <xsl:copy> 182 183 <xsl:variable name="matching_datcat_terms" select="$datcat_termsets//Term[@datcat=current()/@datcat]" /> 183 <xsl:attribute name="name" select="($matching_datcat_terms//@name)[1]"></xsl:attribute> 184 <xsl:copy-of select="*|@*"></xsl:copy-of> 184 <!-- <xsl:variable name="matching_datcat_relterms" select="$datcat_termsets//Term[@datcat=current()/@datcat]" /> --> 185 <xsl:variable name="name" select="($matching_datcat_terms//@name)[1]"></xsl:variable> 186 <xsl:attribute name="name" select="$name"></xsl:attribute> 187 <xsl:attribute name="path" select="concat(ancestor::Termset/@id,':',$name)"></xsl:attribute> 188 <xsl:copy-of select="@*"></xsl:copy-of> 185 189 <xsl:copy-of select="$matching_datcat_terms" /> 190 <xsl:apply-templates select="Term" mode="resolve-relcat"> 191 <xsl:with-param name="datcat_termsets" select="$datcat_termsets"/> 192 </xsl:apply-templates> 186 193 </xsl:copy> 187 194 </xsl:template> -
MDService2/trunk/MDService2/src/xsl/terms2view.xsl
r789 r794 50 50 <div id="terms-matrix"> 51 51 <xsl:apply-templates select="Termsets/Termset" mode="terms-tree" /> 52 </div> 53 52 </div> 54 53 </xsl:when> 55 <!--<xsl:when test="$format='terms2htmllist'" >54 <xsl:when test="$format='terms2htmllist'" > 56 55 <xsl:call-template name="list"/> 57 </xsl:when> -->58 <xsl:when test="$format='terms2autocomplete'" >59 <xsl:call-template name="autocomplete"/>60 56 </xsl:when> 61 <xsl:when test="$format='terms2htmlselect'" > 57 <xsl:when test="$format='terms2autocomplete'" > 58 <xsl:variable name="terms_flat" > 59 <xsl:call-template name="terms-flat"/> 60 </xsl:variable> 61 <xsl:apply-templates select="$terms_flat" mode="autocomplete"/> 62 </xsl:when> 63 <xsl:when test="$format='terms2htmlselect'" > 62 64 <select id="terms-select"> 63 65 <xsl:apply-templates select=".//Termset" mode="select"/> 64 66 </select> 65 67 </xsl:when> 66 68 <xsl:otherwise> … … 104 106 105 107 <xsl:template name="list"> 106 <div id="terms">108 <div class="terms"> 107 109 <!-- format:<xsl:value-of select="$format" /> --> 108 110 <xsl:variable name="translated_term" select="translate(replace(/*/Term[1]/@path,'//',''),'/','.')" /> 109 111 <!-- <input id="query_terms" value="{$translated_term}" /> --> 110 112 <ul class="treeview"> 111 <xsl:apply-templates select="/*/Term /Term" mode="list" />113 <xsl:apply-templates select="/*/Term" mode="list" /> 112 114 </ul> 113 115 </div> … … 123 125 <span class="cmd cmd_detail" ><xsl:text> </xsl:text></span> 124 126 <span class="cmd cmd_columns" ><xsl:text> </xsl:text></span> 125 <div class="detail"> 127 <xsl:call-template name="attr-detail-div" /> 128 <!-- <div class="detail"> 126 129 <xsl:for-each select="@*" > 127 130 <div class="cmds-elem-prop"><span class="label"><xsl:value-of select="name()" />: </span> 128 131 <span class="value"><xsl:value-of select="." /></span></div> 129 132 </xsl:for-each> 130 </div> 133 </div> --> 131 134 </div> 132 135 <ul><xsl:apply-templates select="*" mode="list" /></ul> … … 202 205 </xsl:template> 203 206 204 <xsl:template name="autocomplete"> 205 206 <xsl:for-each-group select="//Term[exists(@name)][not(ancestor::Term[@type='datcat'])]" group-by="lower-case(@name)" > 207 <xsl:template match="Term" mode="autocomplete"> 208 <xsl:copy> 209 <xsl:copy-of select="@*" /> 210 <div class="term-contexts"> 211 <xsl:apply-templates mode="autocomplete" /> 212 </div> 213 </xsl:copy> 214 </xsl:template> 215 216 <xsl:template match="context" mode="autocomplete"> 217 <div class="context cmds-elem-plus"> 218 <span class="detail-caller"><a href="{concat($detail_model_prefix,@path)}" > 219 <xsl:value-of select="@path"/></a></span> 220 221 <xsl:call-template name="attr-detail-div" /> 222 <xsl:apply-templates mode="autocomplete" /> 223 </div> 224 </xsl:template> 225 226 227 <xsl:template name="terms-flat"> 228 229 <!-- group union of model, dcr and rr Terms --> 230 <xsl:for-each-group select=".//Termset[@type='model']//Term | .//Termset[@type='dcr']/Term | .//Termset[@type='rr']//Term[@type='rel']" group-by="lower-case(@name)" > 231 <!-- <xsl:for-each-group select="//Term[exists(@name)][parent::Termset]" group-by="lower-case(@name)" >--> 207 232 <xsl:sort select="lower-case(@name)" /> 208 < xsl:if test="exists(current-group()[not(@type='datcat')])">233 <!-- <xsl:if test="exists(current-group()[not(@type='datcat')])" > --> 209 234 <Term name="{@name}"> 210 235 <xsl:for-each select="current-group()[not(@type='datcat' or @type='rel')]" > 211 <context><!-- <xsl:value-of select="ancestor::Termset[1]/@id" />: --><xsl:value-of select="@path" /></context> 236 <context><!-- <xsl:value-of select="ancestor::Termset[1]/@id" />: --> 237 <xsl:copy-of select="@*" /> 238 <xsl:value-of select="@path" /></context> 212 239 </xsl:for-each> 213 <xsl:for-each select="current-group()[@type='datcat' or @type='rel']" >240 <xsl:for-each select="current-group()[@type='datcat'][parent::Termset]" > 214 241 <xsl:variable name="datcat" select="." /> 215 <context><xsl: value-of select="ancestor::Termset[1]/@id" />:<xsl:value-of select="@name" />242 <context><xsl:copy-of select="@*" /><xsl:value-of select="ancestor::Termset[1]/@id" />:<xsl:value-of select="@name" /> 216 243 <xsl:for-each-group select="$datcat/Term" group-by="@path" > 217 <context><xsl: value-of select="@path" /></context>244 <context><xsl:copy-of select="@*" /><xsl:copy-of select="@*" /><xsl:value-of select="@path" /></context> 218 245 </xsl:for-each-group> 219 246 </context> 220 247 </xsl:for-each> 248 249 <xsl:for-each select="current-group()[@type='rel']" > 250 <xsl:variable name="datcat" select="if(parent::Term[@type='rel']) then parent::Term[@type='rel'] else . " /> 251 <context><xsl:copy-of select="@*" /><!-- <xsl:value-of select="ancestor::Termset[1]/@id" />: --><xsl:value-of select="@path" /> 252 <!-- <xsl:for-each-group select="$datcat//Term[@type!='datcat']" group-by="@path" >--> 253 254 <xsl:for-each select="$datcat//Term[@type='datcat']" > <!-- [Term/@path] --> 255 <context><xsl:copy-of select="@*" /><xsl:value-of select="@path" /> 256 <xsl:for-each-group select="Term[@path]" group-by="@path" > 257 <context><xsl:copy-of select="@*" /><xsl:value-of select="@path" /></context> 258 </xsl:for-each-group> 259 </context> 260 </xsl:for-each> 261 </context> 262 </xsl:for-each> 221 263 </Term> 222 </xsl:if>264 <!-- </xsl:if>--> 223 265 </xsl:for-each-group> 224 266 </xsl:template>
Note: See TracChangeset
for help on using the changeset viewer.