Ignore:
Timestamp:
07/11/10 17:41:41 (14 years ago)
Author:
vronk
Message:

rework Component resolution in XSL:
redirect Comp-requests via MDService (to enable caching)

Location:
MDService2/trunk/MDService2/src/xsl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • MDService2/trunk/MDService2/src/xsl/XCQL2Xpath.xsl

    r561 r580  
    4242<xsl:output method="text" />
    4343
    44 
     44       
    4545<xsl:template match="triple">
    4646<!--  this is rather hacky yet
  • MDService2/trunk/MDService2/src/xsl/cmd_commons.xsl

    r574 r580  
    7474
    7575                <!-- <xsl:variable name="resolved_fn" select="if (matches(@filename, $prefix)) then replace(@filename, $prefix, $prefix_replace) else if (document-uri(/)) then @filename else concat( $root_uri, '/', @filename)" /> -->
    76                 <xsl:variable name="resolved_fn" select="concat($components_uri, @ComponentId)" />
     76                <!--  <xsl:variable name="resolved_fn" select="concat($components_uri, @ComponentId)" />  -->
     77                <xsl:variable name="resolved_fn" select="concat($components_uri, my:extractID(@ComponentId))" />   
    7778            <xsl:variable name="compid" select="@ComponentId" />
    7879               
  • MDService2/trunk/MDService2/src/xsl/comp2view.xsl

    r575 r580  
    1414    <xsl:include href="cmd_commons.xsl"/>
    1515
    16     <xsl:output method="html" encoding="UTF-8" indent="yes"/>
     16    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    1717               
    1818        <xsl:param name="title"
     
    8787                                        </xsl:if>               
    8888                                </span>
    89                                 <xsl:if test="@CardinalityMax &gt; 1" >
     89                                <xsl:if test="number(@CardinalityMax) &gt; 1 or @CardinalityMax='unbounded'" >
    9090                                        <span class="cmd cmd_add"><xsl:text> </xsl:text></span>                 
    9191                                </xsl:if>       
     
    113113                </span><br/>           
    114114                  <input type="text" id="q_{@name}" value="" size="50" name="q_{@name}" />
    115                 <xsl:if test="@CardinalityMax &gt; 1" >
     115                <xsl:if test="number(@CardinalityMax) &gt; 1 or @CardinalityMax='unbounded'" >
    116116                        <span class="cmd cmd_add"><xsl:text> </xsl:text></span>                 
    117117                </xsl:if>               
  • MDService2/trunk/MDService2/src/xsl/params.xsl

    r574 r580  
    1212               
    1313        <!--  for resolving components by suffixing with @ComponentId -->
    14         <xsl:param name="components_uri" select="'http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/'" />         
     14        <!-- <xsl:param name="components_uri" select="'http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/'" /> -->
     15        <!--  redirecting the resolution via MDService, to be able to make use of the cache
     16                the absolute-URL is not nice, however I wasn't able to tell XSL how to resolve a relative url
     17        -->     
     18        <xsl:param name="components_uri" select="'http://localhost:8080/MDService2/comp/xml/'" />               
    1519        <xsl:param name="components_id_prefix" select="'clarin.eu:cr1:'" />
    1620       
    1721        <xsl:param name="detail_comp_prefix"  select="'comp/htmldetail/'"/>
    1822        <xsl:param name="detail_profile_prefix"  select="'compprofile/htmldetail/'"/>
    19         <xsl:param name="detail_complist_prefix"  select="if(contains(name(/*),'profile')) then $detail_profile_prefix else $detail_comp_prefix"/> <!-- table|list -->
     23        <xsl:param name="detail_complist_prefix"  select="if(contains(name(/*),'profile')) then $detail_profile_prefix else $detail_comp_prefix"/>
    2024       
    2125        <xsl:param name="detail_model_prefix"  select="'?q='"/>
Note: See TracChangeset for help on using the changeset viewer.