Changeset 5702 for cats


Ignore:
Timestamp:
10/10/14 11:23:44 (10 years ago)
Author:
Menzo Windhouwer
Message:

M mod-ISOcat-site/module.xml
M mod-ISOcat-site/site/clarin/vlo/mapping/facetConcepts.acc
M mod-ISOcat-site/site/clarin/vlo/mapping/index.html

  • make it possible to request the used facetConcepts.xml
Location:
cats/ISOcat/trunk/mod-ISOcat-site
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-site/module.xml

    r5533 r5702  
    391391            <to>active:sloot.accessor+operand@ffcpl:/site/clarin/vlo/mapping/check.acc$1</to>
    392392        </rule>
    393        
     393        <rule>
     394                <match>ffcpl:/clarin/vlo/mapping/facetConcepts.xml</match>
     395                <to>active:sloot.accessor+operand@ffcpl:/site/clarin/vlo/mapping/facetConcepts.acc+representation@data:text/plain,xml</to>
     396        </rule>
     397       
    394398        <!-- index.html and friends -->
    395399        <rule>
     
    452456        <!-- CLARIN VLO facet mapping -->
    453457        <rewrite>
    454             <match>ffcpl:/site/clarin/vlo/mapping/facetConcepts.xml</match>
    455             <to>active:sloot.accessor+operand@ffcpl:/site/clarin/vlo/mapping/facetConcepts.acc</to>
     458            <match>ffcpl:/site/clarin/vlo/mapping/facetConcepts.html</match>
     459            <to>active:sloot.accessor+operand@ffcpl:/site/clarin/vlo/mapping/facetConcepts.acc+representation@data:text/plain,html</to>
    456460        </rewrite>
    457461        <!-- open up the file system -->
  • cats/ISOcat/trunk/mod-ISOcat-site/site/clarin/vlo/mapping/facetConcepts.acc

    r4292 r5702  
    33    <name>/clarin/vlo/mapping/facetConfig.xml</name>
    44    <descr>Turn the VLO facet mapping in some nice HTML.</descr>
     5        <param>
     6                <name>representation</name>
     7                <descr>the profile to check</descr>
     8                <source>
     9                        <nvp/>
     10                        <default>
     11                                <string>html</string>
     12                        </default>
     13                </source>
     14        </param>
     15       
    516    <idoc>
    617        <instr>
     
    1728            </instr>
    1829        </accessor-debug>
    19         <instr>
    20             <type>xslt2</type>
    21             <operand>curi:var:conf</operand>
    22             <operator>
    23                 <xsl:stylesheet
    24                     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    25                     version="2.0"
    26                 >
    27                     <xsl:template match="text()"/>
    28 
    29                     <xsl:template match="/facetConcepts">
    30                         <dl>
    31                             <xsl:apply-templates/>
    32                         </dl>
    33                     </xsl:template>
    34                     <xsl:template match="facetConcept">
    35                         <dt>
    36                             <xsl:text>Facet: </xsl:text>
    37                             <xsl:value-of select="@name"/>
    38                         </dt>
    39                         <dd>
    40                             <xsl:if test="@allowMultipleValues='true'">
    41                                 <p>Multiple values are allowed.</p>
    42                             </xsl:if>
    43                             <dl>
    44                                 <xsl:apply-templates/>
    45                             </dl>
    46                         </dd>
    47                     </xsl:template>
    48                     <xsl:template match="concept">
    49                         <dt>
    50                             <xsl:text>CMD Element ConceptLink: </xsl:text>
    51                             <a href="{.}">
    52                                 <xsl:value-of select="."/>
    53                             </a>
    54                         </dt>
    55                     </xsl:template>
    56                     <xsl:template match="acceptableContext">
    57                         <dt>
    58                             <xsl:text>Acceptable context</xsl:text>
    59                         </dt>
    60                         <dd>
    61                             <xsl:if test="empty(@includeEmpty) or (@includeEmpty='true')">
    62                                 <p>An empty context leads to acception.</p>
    63                             </xsl:if>
    64                             <xsl:if test="@includeAny='true'">
    65                                 <p>Any context, which is not rejected, leads to acception.</p>
    66                             </xsl:if>
    67                             <dl>
    68                                 <xsl:apply-templates/>
    69                             </dl>
    70                         </dd>
    71                     </xsl:template>
    72                     <xsl:template match="acceptableContext/concept">
    73                         <dt>
    74                             <xsl:text>Accepted CMD Container ConceptLink: </xsl:text>
    75                             <a href="{.}">
    76                                 <xsl:value-of select="."/>
    77                             </a>
    78                         </dt>
    79                     </xsl:template>
    80                     <xsl:template match="rejectableContext">
    81                         <dt>
    82                             <xsl:text>Rejectable context</xsl:text>
    83                         </dt>
    84                         <dd>
    85                             <xsl:if test="empty(@includeAny) or (@includeAny='true')">
    86                                 <p>Any context leads to rejection.</p>
    87                             </xsl:if>
    88                             <xsl:if test="@includeEmpty='true'">
    89                                 <p>Any empty context leads to rejection.</p>
    90                             </xsl:if>
    91                             <dl>
    92                                 <xsl:apply-templates/>
    93                             </dl>
    94                         </dd>
    95                     </xsl:template>
    96                     <xsl:template match="rejectableContext/concept">
    97                         <dt>
    98                             <xsl:text>Rejected CMD Container ConceptLink: </xsl:text>
    99                             <a href="{.}">
    100                                 <xsl:value-of select="."/>
    101                             </a>
    102                         </dt>
    103                     </xsl:template>
    104                     <xsl:template match="pattern">
    105                         <dt>
    106                             <xsl:text>Fallback xpath: </xsl:text>
    107                             <xsl:value-of select="."/>
    108                         </dt>
    109                     </xsl:template>
    110                     <xsl:template match="blacklistPattern">
    111                         <dt>
    112                             <xsl:text>Blacklist xpath: </xsl:text>
    113                             <xsl:value-of select="."/>
    114                         </dt>
    115                     </xsl:template>
    116                 </xsl:stylesheet>
    117             </operator>
    118             <target>this:response</target>
    119         </instr>
     30        <choose>
     31                <cond>
     32                        <instr>
     33                                <type>sloot.xpath2eval</type>
     34                                <operand>var:representation</operand>
     35                                <operator>
     36                                        <xpath>.='xml'</xpath>
     37                                </operator>
     38                                <target>this:cond</target>
     39                        </instr>
     40                </cond>
     41                <then>
     42                        <instr>
     43                                <type>copy</type>
     44                                <operand>curi:var:conf</operand>
     45                                <target>this:response</target>
     46                        </instr>
     47                </then>
     48                <else>
     49                        <instr>
     50                                <type>xslt2</type>
     51                                <operand>curi:var:conf</operand>
     52                                <operator>
     53                                        <xsl:stylesheet
     54                                                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     55                                                version="2.0"
     56                                                >
     57                                                <xsl:template match="text()"/>
     58                                               
     59                                                <xsl:template match="/facetConcepts">
     60                                                        <dl>
     61                                                                <xsl:apply-templates/>
     62                                                        </dl>
     63                                                </xsl:template>
     64                                                <xsl:template match="facetConcept">
     65                                                        <dt>
     66                                                                <xsl:text>Facet: </xsl:text>
     67                                                                <xsl:value-of select="@name"/>
     68                                                        </dt>
     69                                                        <dd>
     70                                                                <xsl:if test="@allowMultipleValues='true'">
     71                                                                        <p>Multiple values are allowed.</p>
     72                                                                </xsl:if>
     73                                                                <dl>
     74                                                                        <xsl:apply-templates/>
     75                                                                </dl>
     76                                                        </dd>
     77                                                </xsl:template>
     78                                                <xsl:template match="concept">
     79                                                        <dt>
     80                                                                <xsl:text>CMD Element ConceptLink: </xsl:text>
     81                                                                <a href="{.}">
     82                                                                        <xsl:value-of select="."/>
     83                                                                </a>
     84                                                        </dt>
     85                                                </xsl:template>
     86                                                <xsl:template match="acceptableContext">
     87                                                        <dt>
     88                                                                <xsl:text>Acceptable context</xsl:text>
     89                                                        </dt>
     90                                                        <dd>
     91                                                                <xsl:if test="empty(@includeEmpty) or (@includeEmpty='true')">
     92                                                                        <p>An empty context leads to acception.</p>
     93                                                                </xsl:if>
     94                                                                <xsl:if test="@includeAny='true'">
     95                                                                        <p>Any context, which is not rejected, leads to acception.</p>
     96                                                                </xsl:if>
     97                                                                <dl>
     98                                                                        <xsl:apply-templates/>
     99                                                                </dl>
     100                                                        </dd>
     101                                                </xsl:template>
     102                                                <xsl:template match="acceptableContext/concept">
     103                                                        <dt>
     104                                                                <xsl:text>Accepted CMD Container ConceptLink: </xsl:text>
     105                                                                <a href="{.}">
     106                                                                        <xsl:value-of select="."/>
     107                                                                </a>
     108                                                        </dt>
     109                                                </xsl:template>
     110                                                <xsl:template match="rejectableContext">
     111                                                        <dt>
     112                                                                <xsl:text>Rejectable context</xsl:text>
     113                                                        </dt>
     114                                                        <dd>
     115                                                                <xsl:if test="empty(@includeAny) or (@includeAny='true')">
     116                                                                        <p>Any context leads to rejection.</p>
     117                                                                </xsl:if>
     118                                                                <xsl:if test="@includeEmpty='true'">
     119                                                                        <p>Any empty context leads to rejection.</p>
     120                                                                </xsl:if>
     121                                                                <dl>
     122                                                                        <xsl:apply-templates/>
     123                                                                </dl>
     124                                                        </dd>
     125                                                </xsl:template>
     126                                                <xsl:template match="rejectableContext/concept">
     127                                                        <dt>
     128                                                                <xsl:text>Rejected CMD Container ConceptLink: </xsl:text>
     129                                                                <a href="{.}">
     130                                                                        <xsl:value-of select="."/>
     131                                                                </a>
     132                                                        </dt>
     133                                                </xsl:template>
     134                                                <xsl:template match="pattern">
     135                                                        <dt>
     136                                                                <xsl:text>Fallback xpath: </xsl:text>
     137                                                                <xsl:value-of select="."/>
     138                                                        </dt>
     139                                                </xsl:template>
     140                                                <xsl:template match="blacklistPattern">
     141                                                        <dt>
     142                                                                <xsl:text>Blacklist xpath: </xsl:text>
     143                                                                <xsl:value-of select="."/>
     144                                                        </dt>
     145                                                </xsl:template>
     146                                        </xsl:stylesheet>
     147                                </operator>
     148                                <target>this:response</target>
     149                        </instr>
     150                </else>
     151        </choose>
    120152    </idoc>
    121153    <exception>
  • cats/ISOcat/trunk/mod-ISOcat-site/site/clarin/vlo/mapping/index.html

    r4293 r5702  
    6666                                        <div class="subtitle">The facet mapping</div>
    6767                                        <p>
    68                                                 <xi:include href="facetConcepts.xml"/>
     68                                                <xi:include href="facetConcepts.html"/>
    6969                                        </p>
    7070                                        <a name="check"></a>
Note: See TracChangeset for help on using the changeset viewer.