Changeset 2906


Ignore:
Timestamp:
05/21/13 07:21:29 (11 years ago)
Author:
mwindhouwer
Message:

M mod-ISOcat-manage-system/manage/import-batch.acc

  • check if lastChange is not empty

M mod-ISOcat-interface-rest/representations/html/DC-history.xsl

  • fixed link to DC specification

M mod-ISOcat-access-data/dbx/DC-history.xml
M mod-ISOcat-interface-rest/interface/history.acc
A mod-ISOcat-interface-rest/representations/atom
A mod-ISOcat-interface-rest/representations/atom/DC-history.xsl
M mod-ISOcat-interface-rest/etc/XRLLinks.xml

  • enabling atom feed for DC history
Location:
cats/ISOcat/trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-access-data/dbx/DC-history.xml

    r2029 r2906  
    1 <dbx:transform xmlns:dbx="http://www.windhouwer.nl/sloot/dbx">
     1<dbx:transform xmlns:dbx="http://www.windhouwer.nl/sloot/dbx" xmlns:isocat="http://www.isocat.org/">
    22
    33        <dbx:param name="dc"/>
     
    2121                                        <dbx:attribute name="version" field="version"/>
    2222                                        <dbx:attribute name="name" field="name"/>
     23                                        <dbx:attribute name="pid" field="pid"/>
    2324                                </dc>
    2425                                <dbx:for-each table="view_text" min="1" max="*">
     
    2829                                        <dbx:sort field="timestamp" order="descending"/>
    2930                                        <change>
     31                                                <dbx:attribute name="isocat:id" field="id"/>
    3032                                                <dbx:attribute name="timestamp" field="timestamp"/>
    3133                                                <dbx:for-each table="view_user" min="1" max="1" when="normalize-space($current/user)!=''">
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/etc/XRLLinks.xml

    r2322 r2906  
    327327        </link>
    328328        <link>
     329                <ext>/dc/history.atom</ext>
     330                <int>active:sloot.accessor+operand@ffcpl:/interface/history.acc+representation@data:text/plain,atom</int>
     331                <args>method,credentials,dc,Accept</args>
     332        </link>
     333        <link>
    329334                <ext>/dc/scope</ext>
    330335                <int>active:sloot.accessor+operand@ffcpl:/interface/dc-scope.acc</int>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/history.acc

    r2029 r2906  
    6060                                        <type>sloot.mimeparse</type>
    6161                                        <accept>var:Accept</accept>
    62                                         <types>xml:application/xml html:text/html</types>
     62                                        <types>xml:application/xml html:text/html atom:application/atom+xml</types>
    6363                                        <target>var:representation</target>
    6464                                </instr>
     
    143143                                                <cast>
    144144                                                        <mimetype>text/html</mimetype>
     145                                                </cast>
     146                                        </operator>
     147                                        <target>this:response</target>
     148                                </instr>
     149                        </then>
     150                        <cond>
     151                                <instr>
     152                                        <type>sloot.xpath2eval</type>
     153                                        <operand>var:representation</operand>
     154                                        <operator>
     155                                                <xpath>.='atom'</xpath>
     156                                        </operator>
     157                                        <target>this:cond</target>
     158                                </instr>
     159                        </cond>
     160                        <then>
     161                                <instr>
     162                                        <type>xslt2</type>
     163                                        <operand>var:response</operand>
     164                                        <operator>ffcpl:/representations/atom/DC-history.xsl</operator>
     165                                        <props>active:ISOcat.manage.system.properties</props>
     166                                        <target>this:response</target>
     167                                </instr>
     168                                <instr>
     169                                        <type>cast</type>
     170                                        <operand>this:response</operand>
     171                                        <operator>
     172                                                <cast>
     173                                                        <mimetype>application/atom+xml</mimetype>
    145174                                                </cast>
    146175                                        </operator>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/html/DC-history.xsl

    r2029 r2906  
    2424                <xsl:value-of select="$props//site"/>
    2525                <xsl:text>rest/dc/</xsl:text>
    26                 <xsl:value-of select="$node/(@id|@dc)"/>
     26                <xsl:value-of select="$node/(@id|@dc|@ref)"/>
    2727        </xsl:function>
    2828
     
    5252        <xsl:template match="change">
    5353                <dt>
    54                         <xsl:value-of select="@timestamp"/>
    55                         <xsl:text> - </xsl:text>
    56                         <xsl:choose>
    57                                 <xsl:when test="exists(user/name)">
    58                                         <xsl:value-of select="user/name"/>
    59                                 </xsl:when>
    60                                 <xsl:otherwise>
    61                                         <i>unknown</i>
    62                                 </xsl:otherwise>
    63                         </xsl:choose>
     54                        <a name="c{@isocat:id}">
     55                                <xsl:value-of select="@timestamp"/>
     56                                <xsl:text> - </xsl:text>
     57                                <xsl:choose>
     58                                        <xsl:when test="exists(user/name)">
     59                                                <xsl:value-of select="user/name"/>
     60                                        </xsl:when>
     61                                        <xsl:otherwise>
     62                                                <i>unknown</i>
     63                                        </xsl:otherwise>
     64                                </xsl:choose>
     65                        </a>
    6466                </dt>
    6567                <dd>
     
    7981                <span>
    8082                        <xsl:text>History of </xsl:text>
    81                         <xsl:value-of select="isocat:link($node)"/>
     83                        <xsl:copy-of select="isocat:link($node)"/>
    8284                        <xsl:text> - </xsl:text>
    8385                        <xsl:value-of select="$node/@version"/>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/manage/import-batch.acc

    r2029 r2906  
    326326                                                                                                                <xsl:apply-templates select="node()"/>
    327327                                                                                                                <xsl:choose>
    328                                                                                                                         <xsl:when test="exists(dcif:creation)">
     328                                                                                                                        <xsl:when test="normalize-space(dcif:creation)!=''">
    329329                                                                                                                                <isocat:change>
    330330                                                                                                                                        <xsl:value-of select="dcif:creation/dcif:changeDescription"/>
    331331                                                                                                                                </isocat:change>
    332332                                                                                                                        </xsl:when>
    333                                                                                                                         <xsl:when test="exists(dcif:lastChange)">
     333                                                                                                                        <xsl:when test="normalize-space(dcif:lastChange)!=''">
    334334                                                                                                                                <!-- a bit weird: why does a new DC has not a creation but a last change message? -->
    335335                                                                                                                                <isocat:change>
Note: See TracChangeset for help on using the changeset viewer.