Changeset 1226 for MDService2/trunk


Ignore:
Timestamp:
04/20/11 19:48:57 (13 years ago)
Author:
vronk
Message:

record-header (is-part-of, title)

Location:
MDService2/trunk/MDService2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • MDService2/trunk/MDService2/WebContent/ExceptionXML.jsp

    r1187 r1226  
    44<diagnostics>
    55  <diagnostic xmlns="http://www.loc.gov/zing/srw/diagnostic">
    6     <uri>info:srw/diagnostic/1/1</uri>
    7     <details></details>
    8     <message>Exception occured.</message>
    9     <addinfo><s:property value="%{exception.message}"/></addinfo>
     6    <uri>info:srw/diagnostic/1/1</uri>   
     7    <message>Exception occurred: <s:property value="%{exception.message}"/></message>
     8    <details><s:property value="%{exceptionStack}"/></details>   
    109  </diagnostic>
    1110</diagnostics>
  • MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js

    r1223 r1226  
    530530
    531531/**
    532 A singleton-object holding all queries.
    533 @field 
     532@class A singleton-object holding all queries.
     533@static
    534534*/
    535535var queryset = { queries: [],
  • MDService2/trunk/MDService2/WebContent/style/cmds-ui.css

    r1223 r1226  
    77#main {margin-left:260px; /* max-width: .. */}
    88#query-input { padding: 6px;  /* max-width: 600px; */ }
    9 #repositories {margin: 6px; 0px; }
     9#repositories {margin: 6px 0px; }
    1010#notify {max-width: 400px; position: relative; overflow: auto; height: 40px;}
    1111#user {text-align: right;}
     
    8080
    8181.cmds-elem-prop .label { }
    82 .cmds-elem-prop .value {}
    83 
    84 .value-text {}
     82.cmds-elem-prop .value { }
     83
     84
     85.value-text { }
    8586.value-unspecified {}
    8687.value-empty {}
     
    8990.cmds-xmlelem {padding:2px; border-top: 1px dashed #A6C9E2; }
    9091.cmds-xmlelem.has-children { border: 1px solid #A6C9E2; margin: 2px;}
     92.value-text .value { margin-left: 20%; display:block; }
     93.value-text .label { float:left; }
    9194.cmds-xmlelem .attributes .label {}
    9295.cmds-xmlelem .attributes .value {}
     
    107110.wwFormTable {width: 100%; }
    108111#input-simplequery { width: 85%; margin: 12px 0px 6px 0px; font-size: 1.2em;}
    109 #submit-query {}
     112#submit-query { font-size: 1.2em; font-weight: bold;}
    110113#searchclauselist {margin: 0px;}
    111114.searchclause {  }
     
    140143h2 {font-size: 1.4em; margin: 1em 0 0.4em 0;}
    141144h3 {font-size: 1.2em; margin: 0.8em 0 0.4em 0;} 
    142 .title {font-size: 1.2 em; font-weight: bold; margin: 1em 0 0 0.2em;}
     145.title {font-size: 1.2 em; font-weight: bold; margin: 0.4em 0 0 0.2em;}
    143146dt { padding: 1em 0 0.2em 1.5em; font-weight: bold;}
    144147dd { padding-left: 2.5em; display:block; -moz-margin-start: 0px;}
  • MDService2/trunk/MDService2/src/xsl/cmd_commons.xsl

    r1076 r1226  
    234234</xsl:template>
    235235
     236<xsl:template name="getName" >
     237                <xsl:value-of select="(.//*[name() = $name_element])[1]" />
     238</xsl:template>
     239
     240<xsl:template name="getContext" >
     241<!--    <div class="is-part-of collections" ><xsl:value-of select=".//IsPartOf" /> </div>-->
     242        <xsl:apply-templates select=".//IsPartOfList" />
     243</xsl:template>
     244
     245       
     246<xsl:template match="IsPartOfList" >
     247        <div class="ispartof-list"><span class="label">in: </span>
     248                <xsl:apply-templates select=".//IsPartOf" />
     249        </div>
     250</xsl:template>
     251
     252<xsl:template match="IsPartOf" >
     253        <a class="internal" href="{concat($default_prefix, my:encodePID(.))}"><xsl:value-of select="." /></a> >
     254</xsl:template>
     255
    236256
    237257</xsl:stylesheet>
  • MDService2/trunk/MDService2/src/xsl/mdinst2view.xsl

    r1221 r1226  
    5656                        </xsl:when>     
    5757                        <xsl:otherwise>
    58                                 <span class="inner_title"><xsl:attribute name="value"><xsl:value-of select="$inner_title"/></xsl:attribute>
    59                                 </span>
     58                       
     59                        <xsl:call-template name="getContext" />
     60                        <!-- <div class="is-part-of collections" ><xsl:value-of select=".//IsPartOf[@level=1]" /> </div> -->
     61                        <div class="title" ><xsl:call-template name="getName" /></div>
     62                        <!--
     63                                <span class="inner_title"><xsl:attribute name="value"><xsl:value-of select="$inner_title"/>
     64                                </xsl:attribute>
     65                                </span>
     66                                -->
    6067                        </xsl:otherwise>
    61                 </xsl:choose>
     68                </xsl:choose>           
     69         <!--<span class="label">MDRecord View: </span>
     70                <div class="title" ><xsl:value-of select="$inner_title"/></div>-->
     71       
    6272               
    63          
    64          <!--<span class="label">MDRecord View: </span> -->
    65                 <div class="title" ><xsl:value-of select="$inner_title"/></div>
    66        
    67                 <xsl:apply-templates select=".//IsPartOfList" />
    6873                <xsl:apply-templates select=".//ResourceProxyList" />
    6974                <xsl:apply-templates select=".//Components/*" mode="format-xmlelem" />
    7075        </div> 
    71 </xsl:template>
    72        
    73 <xsl:template match="IsPartOfList" >
    74         <div class="ispartof-list"><span class="label">IsPartOf:</span>
    75                 <xsl:apply-templates select=".//IsPartOf" />
    76         </div>
    77 </xsl:template>
    78 
    79 <xsl:template match="IsPartOf" >
    80         <a class="internal" href="{concat($default_prefix, my:encodePID(.))}"><xsl:value-of select="." /></a>,
    8176</xsl:template>
    8277
  • MDService2/trunk/MDService2/src/xsl/mdset2view.xsl

    r1219 r1226  
    104104        <!-- <xsl:param name="lv" select="1" />-->
    105105        <!--<xsl:variable name="lv" select="count(ancestor::d)" /> -->
    106         <xsl:if test="string-length(.//text()) &gt; 1" >
     106        <!-- <xsl:if test="string-length(string-join(.//text(),'')) &gt; 1" > -->               
    107107                <xsl:variable name="has_text" >
    108108                        <xsl:choose>
    109                                 <xsl:when test="normalize-space(text())='Unspecified'">unspecified</xsl:when>
    110                                 <xsl:when test="not(normalize-space(text())='')">text</xsl:when>                               
     109                        <!-- FIXME: text()[1] ? is that safe?-->
     110                                <xsl:when test="normalize-space(text()[1])='Unspecified'">unspecified</xsl:when>
     111                                <xsl:when test="not(normalize-space(text()[1])='')">text</xsl:when>                             
    111112                                <xsl:otherwise>empty</xsl:otherwise>
    112113                        </xsl:choose>
     
    116117                <span class="elem_value"><xsl:value-of select="text()" /></span>
    117118                        <xsl:apply-templates select="*" />                                     
    118                 </div> 
    119         </xsl:if>
     119                </div>
     120       
    120121</xsl:template>
    121122       
     
    216217                <xsl:variable name="terms" >
    217218                        <Terms>
    218                         <!-- if already provided by mdrepo, use that, otherwise DIY -->         
     219                        <!-- TODO: if already provided by mdrepo, use that, otherwise DIY -->           
    219220                        <xsl:choose>
    220221                                <xsl:when test="extraResponseData/resultSummary"><xsl:copy-of select="extraResponseData/resultSummary/Term" /></xsl:when>
     
    254255</xsl:template>
    255256
     257<!--   this should be `record` to make it SRU-compatible -->
    256258<xsl:template match="CMD" mode="table">
    257259        <xsl:variable name="absolute_position" select="if (number($startItem)=number($startItem)) then number($startItem) + position() - 1 else  position()" />
     260        <xsl:variable name="curr_record" select="." />
    258261                <tr>
    259                 <td>
     262                <td rowspan="2">
    260263                        <xsl:choose>
    261264                                <xsl:when test="exists(.//MdSelfLink)" >
     
    268271                                <xsl:otherwise><xsl:value-of select="$absolute_position" /></xsl:otherwise>
    269272                        </xsl:choose>
     273                </td>           
     274                <td colspan="{count($columns/*)}" >
     275                                <xsl:call-template name="getContext" />
     276                        <div class="title" ><xsl:call-template name="getName" /></div>                 
    270277                </td>
    271                 <xsl:variable name="curr_cmd" select="." />
     278                </tr>
     279                <tr>
    272280                <!-- <xsl:for-each select="$cols/col" >
    273281                                        <td ><xsl:value-of select="$curr_cmd//*[name()=current()]" /></td>
     
    293301                                 <xsl:variable name="curr_col_xpath" select="@xpath" />
    294302                        <td>                   
    295                                 <xsl:for-each select="$curr_cmd">
     303                                <xsl:for-each select="$curr_record">
    296304                                        <xsl:call-template name="format-field" >
    297305                                                <xsl:with-param name="elems" select="saxon:evaluate(concat('.//', $curr_col_xpath))" />
     
    333341                </td>
    334342               
    335                 <xsl:variable name="curr_cmd" select="." />
     343                <xsl:variable name="curr_record" select="." />
    336344                       
    337345                <xsl:variable name="cmd_sel_fields" >
    338346                        <xsl:for-each select="$columns/*">
    339347                                <xsl:variable name="curr_col_xpath" select="@xpath" />                                                 
    340                                 <xsl:for-each select="$curr_cmd">                               
     348                                <xsl:for-each select="$curr_record">                           
    341349                                        <xsl:copy-of select="saxon:evaluate(concat('.//', $curr_col_xpath))" />
    342350                                </xsl:for-each>                         
     
    352360
    353361
    354 
    355362</xsl:stylesheet>
  • MDService2/trunk/MDService2/src/xsl/params.xsl

    r1187 r1226  
    5757        <xsl:param name="cache_cols_" >id date duration repository collection lang query squery startItem maximumItems maxDepth</xsl:param>   
    5858        <xsl:param name="cache_cols" select="tokenize($cache_cols_,'\s+')"  />
     59       
     60        <xsl:param name="name_element" select="('title', 'Title', 'Name', 'name', 'ResourceName')"  />
    5961               
    6062       
Note: See TracChangeset for help on using the changeset viewer.