Changeset 3699 for cats/ISOcat


Ignore:
Timestamp:
10/09/13 07:28:55 (11 years ago)
Author:
mwindhouwer
Message:

M clarin/vlo/mapping/check.acc

  • fixed finding the context
  • added link to the profile
  • added some more debug support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-site/site/clarin/vlo/mapping/check.acc

    r3697 r3699  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <accessor debug="true">
     2<accessor debug="false">
    33    <name>/clarin/vlo/mapping/check</name>
    44    <descr>Check the VLO mapping for a specific profile.</descr>
     
    4646                <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
    4747                    <xsl:param name="conf"/>
     48                    <xsl:param name="debug"/>
    4849                    <xsl:variable name="prof" select="/"/>
    4950                    <xsl:template match="/">
     
    6364                                    <xsl:value-of select="/CMD_ComponentSpec/Header/Name"/>
    6465                                    <xsl:text> (</xsl:text>
    65                                     <xsl:value-of select="/CMD_ComponentSpec/Header/ID"/>
     66                                    <a href="$registry$/rest/registry/profiles/{/CMD_ComponentSpec/Header/ID}/xml">
     67                                        <xsl:value-of select="/CMD_ComponentSpec/Header/ID"/>
     68                                    </a>
    6669                                    <xsl:text>)</xsl:text>
    6770                                </h1>
     
    102105                                                    <xsl:when test="exists($facet/acceptableContext) or exists($facet/rejectableContext)">
    103106                                                        <xsl:variable name="ac" select="$facet/acceptableContext"/>
    104                                                         <xsl:variable name="context" select="($leaf/ancestor::*/@ConceptLink)"/>
     107                                                        <!--<xsl:variable name="context" select="($leaf/ancestor::*/@ConceptLink)[last()]"/>-->
     108                                                        <xsl:variable name="context" select="$leaf/ancestor::*[normalize-space(@ConceptLink)!=''][1]/@ConceptLink"/>
     109                                                        <xsl:if test="$debug='t'">
     110                                                            <xsl:message>!DEBUG: path: <xsl:value-of select="string-join(ancestor-or-self::*/@name,'/c:')"/></xsl:message>
     111                                                            <xsl:message>!DEBUG: concept: <xsl:value-of select="current-grouping-key()"/></xsl:message>
     112                                                            <xsl:message>!DEBUG: context(s): <xsl:value-of select="string-join($leaf/ancestor::*/@ConceptLink,', ')"/></xsl:message>
     113                                                            <xsl:message>!DEBUG: parent context: <xsl:value-of select="$context"/></xsl:message>
     114                                                        </xsl:if>
    105115                                                        <p>
    106116                                                            <xsl:text>Context: </xsl:text>
     
    163173            </operator>
    164174            <conf>curi:var:conf</conf>
     175            <debug>var:accessor-debug</debug>
     176            <target>this:response</target>
     177        </instr>
     178        <instr>
     179            <type>sloot.xquery</type>
     180            <operator>
     181                <nvp>
     182                    {doc('etc/config.xml')/nvp/*}
     183                    {doc('active:ISOcat.manage.system.properties')/nvp/*}
     184                </nvp>
     185            </operator>
     186            <target>var:config</target>
     187        </instr>
     188        <accessor-debug>
     189            <instr>
     190                <type>log</type>
     191                <operand>var:config</operand>
     192            </instr>
     193        </accessor-debug>
     194        <instr>
     195            <type>sloot.render</type>
     196            <template>this:response</template>
     197            <attributes>var:config</attributes>
    165198            <target>this:response</target>
    166199        </instr>
Note: See TracChangeset for help on using the changeset viewer.