Changeset 2612


Ignore:
Timestamp:
02/24/13 08:41:45 (11 years ago)
Author:
mwindhouwer
Message:

M mod-ISOcat-access-data/dbx/DCIF.xml

  • added @isocat:isa

M mod-ISOcat-interface-rest/representations/html/datacategory.xsl

  • visualize the is-a hierarchy

M mod-ISOcat-interface-rest/interface/help.html
M mod-ISOcat-interface-rest/interface/services.wadl
M mod-ISOcat-interface-rest/interface/dc.acc
M mod-ISOcat-interface-rest/interface/lock.acc
M mod-ISOcat-interface-rest/representations/dcs2/handle.acc
M mod-ISOcat-interface-rest/representations/dcs2/determine.acc
M mod-ISOcat-interface-rest/representations/dcs2/representations.xml

  • changed application/dcif+xml to application/x-dcif+xml
  • still accept application/dcif+xml in content negotiation
Location:
cats/ISOcat/trunk
Files:
10 edited

Legend:

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

    r2584 r2612  
    182182                <dbx:attribute name="isocat:version" field="version"/>
    183183                <dbx:attribute name="isocat:name" field="name"/>
     184                <dbx:for-each table="link_simple_data_category_super" min="0" max="1">
     185                        <dbx:where field="dc" select="$current/id"/>
     186                        <dbx:attribute name="isocat:isa" field="super"/>
     187                </dbx:for-each>
     188               
    184189                <dbx:choose>
    185190                        <dbx:when test="$mode!='all'">
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCEditor.js

    r2511 r2612  
    13561356                var req = new jsx3.net.Request().open(method,uri,false);
    13571357                req.setRequestHeader("Content-Type","application/xml");// IE doesn't set this automagically (FF does), and otherwise NK won't pass it on to the ISOcat accessors
    1358                 req.setRequestHeader("Accept","application/dcif+xml");// we want the DCIF of the updated/new DC
     1358                req.setRequestHeader("Accept","application/x-dcif+xml");// we want the DCIF of the updated/new DC
    13591359                req.send(dcifDoc.toString());
    13601360               
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/dc.acc

    r2029 r2612  
    212212                                </cond>
    213213                                <then>
     214                                        <accessor-debug>
     215                                                <instr>
     216                                                        <type>log</type>
     217                                                        <operand>var:Accept</operand>
     218                                                </instr>
     219                                        </accessor-debug>
    214220                                        <instr>
    215221                                                <type>sloot.mimeparse</type>
    216222                                                <accept>var:Accept</accept>
    217                                                 <types>dcif:application/dcif+xml rdf:application/rdf+xml html:text/html</types>
     223                                                <types>dcif:application/x-dcif+xml rdf:application/rdf+xml html:text/html dcif:application/dcif+xml</types>
    218224                                                <target>var:representation</target>
    219225                                        </instr>
     226                                        <accessor-debug>
     227                                                <instr>
     228                                                        <type>log</type>
     229                                                        <operand>var:representation</operand>
     230                                                </instr>
     231                                        </accessor-debug>
    220232                                </then>
    221233                        </if>
     
    581593                                                <operator>
    582594                                                        <cast>
    583                                                                 <mimetype>application/dcif+xml</mimetype>
     595                                                                <mimetype>application/x-dcif+xml</mimetype>
    584596                                                        </cast>
    585597                                                </operator>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/help.html

    r2029 r2612  
    567567                                                                                <tbody>
    568568                                                                                        <tr>
    569                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     569                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    570570                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    571571                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    572                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     572                                                                                                <td/>
    573573                                                                                        </tr>
    574574                                                                                        <tr>
     
    786786                                                                                <tbody>
    787787                                                                                        <tr>
    788                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     788                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    789789                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    790790                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    791                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     791                                                                                                <td/>
    792792                                                                                        </tr>
    793793                                                                                        <tr>
     
    983983                                                                                <tbody>
    984984                                                                                        <tr>
    985                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     985                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    986986                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    987987                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    988                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     988                                                                                                <td/>
    989989                                                                                        </tr>
    990990                                                                                        <tr>
     
    12061206                                                                                <tbody>
    12071207                                                                                        <tr>
    1208                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     1208                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    12091209                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    12101210                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    1211                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     1211                                                                                                <td/>
    12121212                                                                                        </tr>
    12131213                                                                                        <tr>
     
    15901590                                                                                <tbody>
    15911591                                                                                        <tr>
    1592                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     1592                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    15931593                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    15941594                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    1595                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     1595                                                                                                <td/>
    15961596                                                                                        </tr>
    15971597                                                                                        <tr>
     
    17741774                                                                                <tbody>
    17751775                                                                                        <tr>
    1776                                                                                                 <td>application/dcif+xml (<i>default</i>)</td>
     1776                                                                                                <td>application/x-dcif+xml (<i>default</i>)</td>
    17771777                                                                                                <td><a href="$site$12620/schemas/DCIF.rng">Relax NG</a></td>
    17781778                                                                                                <td><a href="http://www.isocat.org/index_bestanden/12620.html">Data Category Interchange Format</a></td>
    1779                                                                                                 <td>this is not (yet) a <a href="http://www.iana.org/assignments/media-types/">IANA </a>registered <a href="http://tools.ietf.org/html/rfc3023#appendix-A">+xml media type</a></td>
     1779                                                                                                <td/>
    17801780                                                                                        </tr>
    17811781                                                                                        <tr>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/lock.acc

    r2029 r2612  
    356356                                                                        <operator>
    357357                                                                                <cast>
    358                                                                                         <mimetype>application/dcif+xml</mimetype>
     358                                                                                        <mimetype>application/x-dcif+xml</mimetype>
    359359                                                                                </cast>
    360360                                                                        </operator>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/services.wadl

    r2029 r2612  
    5555                </request>
    5656                <response>
    57                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     57                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    5858                        <param name="DCs" path="//dcif:dataCategory/@pid" repeating="true" type="xs:anyURI" style="plain">
    5959                            <link resource_type="#dc"/>
     
    8686                </request>
    8787                <response>
    88                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     88                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    8989                        <param name="DCs" path="//dcif:dataCategory/@pid" repeating="true" type="xs:anyURI" style="plain">
    9090                            <link resource_type="#dc"/>
     
    107107                </request>
    108108                <response>
    109                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     109                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    110110                        <param name="values" path="//dcif:value/@pid" repeating="true" type="xs:anyURI" style="plain">
    111111                            <link resource_type="#dc"/>
     
    136136                </request>
    137137                <response>
    138                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     138                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    139139                        <param name="DCs" path="//dcif:dataCategory/@pid" repeating="true" type="xs:anyURI" style="plain">
    140140                            <link resource_type="#dc"/>
     
    207207                </request>
    208208                <response>
    209                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     209                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    210210                        <param name="DCs" path="//dcif:dataCategory/@pid" repeating="true" type="xs:anyURI" style="plain">
    211211                            <link resource_type="#dc"/>
     
    229229                </request>
    230230                <response>
    231                     <representation mediaType="application/dcif+xml" element="dcif:dataCategorySelection">
     231                    <representation mediaType="application/x-dcif+xml" element="dcif:dataCategorySelection">
    232232                        <param name="DCs" path="//dcif:dataCategory/@pid" repeating="true" type="xs:anyURI" style="plain">
    233233                            <link resource_type="#dc"/>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/determine.acc

    r2029 r2612  
    1 <accessor debug="false">
     1<accessor debug="true">
    22        <name>ISOcat.interface.rest.dcs.determine.representation</name>
    33        <descr>Determine the requested representation for a DCS.</descr>
     
    2525        </param>
    2626        <idoc>
     27                <accessor-debug>
     28                        <instr>
     29                                <type>log</type>
     30                                <operand>var:accept</operand>
     31                        </instr>
     32                </accessor-debug>
    2733                <if>
    2834                        <cond>
     
    4046                                        <type>sloot.mimeparse</type>
    4147                                        <accept>var:accept</accept>
    42                                         <types>dcif:application/dcif+xml rdf:application/rdf+xml xml:application/xml html:text/html rng:application/xml xsd:application/xml</types>
     48                                        <types>dcif:application/x-dcif+xml rdf:application/rdf+xml xml:application/xml html:text/html rng:application/xml xsd:application/xml dcif:application/dcif+xml </types>
    4349                                        <target>this:response</target>
    4450                                </instr>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/handle.acc

    r2369 r2612  
    320320                                        <operator>
    321321                                                <cast>
    322                                                         <mimetype>application/dcif+xml</mimetype>
     322                                                        <mimetype>application/x-dcif+xml</mimetype>
    323323                                                </cast>
    324324                                        </operator>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/representations.xml

    r2369 r2612  
    55        <description>Data Category Interchange Format</description>
    66        <extension>dcif</extension>
    7         <mime>application/dcif+xml</mime>
     7        <mime>application/x-dcif+xml</mime>
    88    </representation>
    99    <representation export="false">
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/html/datacategory.xsl

    r2322 r2612  
    1919       
    2020        <xsl:variable name="DCS" select="document('active:ISOcat.manage.dm.dcs')"/>
     21       
     22        <xsl:key name="val" match="dcif:value" use="@isocat:id"/>
    2123
    2224        <xsl:function name="isocat:name">
     
    9294       
    9395        <xsl:template name="reference">
     96                <xsl:param name="indent" select="''" tunnel="yes"/>
    9497                <tr class="DC-data">
    9598                        <xsl:if test="ancestor-or-self::*/@isocat:suppress='true'">
     
    100103                        </td>
    101104                        <td class="DC-data-value">
     105                                <span stle="color:gray;">
     106                                        <xsl:value-of select="$indent"/>
     107                                </span>
    102108                                <span>
    103109                                        <xsl:if test="ancestor-or-self::*/@isocat:suppress='true'">
     
    138144        <xsl:template match="dcif:isA" priority="1"/>
    139145       
     146        <xsl:template match="dcif:conceptualDomain[@type='closed']" priority="1">
     147                <xsl:param name="class" select="''" tunnel="yes"/>
     148                <xsl:variable name="level" select="isocat:level(.)"/>
     149                <tr class="DC-header{if (normalize-space($class)!='') then (concat(' ',$class)) else ()}">
     150                        <th colspan="2">
     151                                <xsl:if test="ancestor-or-self::*/@isocat:suppress='true'">
     152                                        <xsl:attribute name="style" select="'color:gray;'"/>
     153                                </xsl:if>
     154                                <xsl:choose>
     155                                        <xsl:when test="$level &lt; 1">
     156                                                <xsl:attribute name="class" select="concat('DC-header-level-',$level + 1)"/>
     157                                                <xsl:value-of select="isocat:section(.)"/>
     158                                                <xsl:text>. </xsl:text>
     159                                                <xsl:value-of select="isocat:name(.)"/>
     160                                        </xsl:when>
     161                                        <xsl:when test="$level &lt; 2">
     162                                                <xsl:attribute name="class" select="concat('DC-header-level-',$level + 1)"/>
     163                                                <xsl:value-of select="isocat:section(.)"/>
     164                                                <xsl:text> </xsl:text>
     165                                                <xsl:value-of select="isocat:name(.)"/>
     166                                        </xsl:when>
     167                                        <xsl:otherwise>
     168                                                <xsl:attribute name="class" select="'DC-header-level-x'"/>
     169                                                <xsl:value-of select="isocat:section(.)"/>
     170                                                <xsl:text> </xsl:text>
     171                                                <xsl:value-of select="isocat:name(.)"/>
     172                                        </xsl:otherwise>
     173                                </xsl:choose>
     174                        </th>
     175                </tr>
     176                <xsl:apply-templates select="child::*[empty(child::*)] except dcif:note"/>
     177                <xsl:apply-templates select="child::*[exists(child::*)] except dcif:value"/>
     178                <xsl:for-each select="dcif:value[empty(@isocat:isa) or empty(key('val',@isocat:isa,current()))]">
     179                        <xsl:apply-templates select=".">
     180                                <xsl:with-param name="indent" select="''" tunnel="yes"/>
     181                        </xsl:apply-templates>
     182                </xsl:for-each>
     183                <xsl:if test="exists(dcif:note[normalize-space(.)!=''])">
     184                        <tr class="DC-header">
     185                                <th colspan="2" class="DC-header-level-x">
     186                                        <xsl:value-of select="isocat:section(.)"/>
     187                                        <xsl:text>.</xsl:text>
     188                                        <xsl:value-of select="count(child::*[exists(child::*)]) + 1"/>
     189                                        <xsl:text> Note Section</xsl:text>
     190                                </th>
     191                        </tr>
     192                        <xsl:apply-templates select="dcif:note[normalize-space(.)!='']"/>
     193                </xsl:if>
     194        </xsl:template>
     195       
    140196        <xsl:template match="dcif:value" priority="1">
    141                 <xsl:call-template name="reference"/>
     197                <xsl:param name="indent" tunnel="yes"/>
     198                <xsl:value-of select="$indent"/>
     199                <xsl:call-template name="reference">
     200                        <xsl:with-param name="indent" select="$indent"/>
     201                </xsl:call-template>
     202                <xsl:for-each select="../dcif:value[@isocat:isa=current()/@isocat:id]">
     203                        <xsl:apply-templates select=".">
     204                                <xsl:with-param name="indent" select="concat($indent,'&#183;&#160;')" tunnel="yes"/>
     205                        </xsl:apply-templates>
     206                </xsl:for-each>
    142207        </xsl:template>
    143208       
Note: See TracChangeset for help on using the changeset viewer.