Changeset 38164 for gs3-installations


Ignore:
Timestamp:
2023-09-19T11:54:02+12:00 (9 months ago)
Author:
davidb
Message:

Tabletop XML output for CoolStuff added for CL4, which targets the CL4.1, CL4.2 etc nodes

Location:
gs3-installations/computing50/trunk/sites/computing50/collect/computing-50-tabletop
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/computing50/trunk/sites/computing50/collect/computing-50-tabletop/etc/collectionConfig.xml

    r38158 r38164  
    416416            <option name="-buttonname" value="Photographs"/>
    417417            <format>
    418 <!--
    419 Pictures,Title,Description,MajorEventsID,Per_EventsID,LocationID,MapID,[Cool+stuff],Stream,Audio,LocationY,LocationX,Achnolodgements,Order
    420 -->
    421             <gsf:template match="documentNode">
     418              <!-- For tabletop, want to present 1st level classifier nodes as CoolStuff (aka collections) -->
     419              <!-- <c></c> content, then, generated from the VList classifier rule, and documentNode empty -->
     420             
     421              <gsf:template match="classifierNode[@classifierStyle = 'VList']">
     422
     423                <xsl:choose>
     424                  <xsl:when test="/page/pageRequest/@subaction = 'tabletop'">
     425                <!-- ID,Title,Description,Order -->
     426                <xsl:variable name="nodeID">
     427                  <xsl:value-of select="substring(@nodeID,5)"/>
     428                </xsl:variable>
     429               
     430                <c>
     431                  <!-- ID -->
     432                  <xsl:value-of select="$nodeID"/>
     433                </c>
     434                <c>
     435                  <gsf:metadata name="Title"/>
     436                </c>
     437                <c>
     438                  <!-- Description -->
     439                  <gsf:metadata name="Title"/>
     440                </c>
     441                <c>
     442                  <!-- Order -->
     443                  <xsl:value-of select="$nodeID"/>
     444                </c>
     445                  </xsl:when>
     446                  <xsl:otherwise>
     447               
     448                <td valign="top">
     449                  <gsf:link style="static" type="classifier">
     450                    <gsf:icon type="classifier"/>
     451                  </gsf:link>
     452                </td>
     453                <td valign="top">
     454                  <gsf:link type="classifier">
     455                    <gsf:metadata name="Title"/>
     456                  </gsf:link>
     457                </td>
     458                  </xsl:otherwise>
     459                </xsl:choose>
     460               
     461              </gsf:template>
     462
     463<!--
     464              <gsf:template match="classifierNode[@classifierStyle = 'HList']">
     465                <gsf:link type="classifier">
     466                  <gsf:metadata name="Title"/>
     467                </gsf:link>
     468              </gsf:template>
     469-->           
     470              <gsf:template match="documentNode">
     471
     472                <xsl:choose>
     473                  <xsl:when test="/page/pageRequest/@subaction = 'tabletop'">
     474                <!-- deliberately empty -->
     475                  </xsl:when>
     476                  <xsl:otherwise>
     477                     
    422478                <td valign="top">
    423479                    <gsf:link type="source">
     
    439495                    </gsf:link>
    440496                </td>
    441             </gsf:template>
    442 <!--
    443 <gsf:template match="classifierNode[@classifierStyle = 'VList']">
    444                 <td valign="top">
    445                   <gsf:link style="static" type="classifier">
    446                 <gsf:icon type="classifier"/>
    447                   </gsf:link>
    448                 </td>
    449                 <td valign="top">
    450                   <gsf:link type="classifier">
    451                 <gsf:metadata name="Title"/>
    452                   </gsf:link>
    453                 </td>
     497                  </xsl:otherwise>
     498                </xsl:choose>
    454499              </gsf:template>
    455500
    456               <gsf:template match="classifierNode[@classifierStyle = 'HList']">
    457                 <gsf:link type="classifier">
    458                   <gsf:metadata name="Title"/>
    459                 </gsf:link>
    460               </gsf:template>
    461 -->
     501
    462502        </format>
    463503        </classifier>
  • gs3-installations/computing50/trunk/sites/computing50/collect/computing-50-tabletop/transform/pages/classifier.xsl

    r38012 r38164  
    2020    <xsl:choose>
    2121      <xsl:when test="@childType = 'VList'">
    22         <xsl:for-each select='documentNode'>
    23           <r>
    24             <xsl:choose>
     22        <xsl:for-each select='classifierNode|documentNode'>
     23      <r>
     24        <xsl:choose>
    2525              <xsl:when test="name()='documentNode'">
    2626                      <xsl:call-template name="documentNodeWrapperTabletop">
     
    2929                      </xsl:call-template>
    3030              </xsl:when>
     31          <xsl:when test="name()='classifierNode' and (@childType = 'VList')">
     32        <xsl:apply-templates select='.'>
     33                  <xsl:with-param name='collName' select='$collName' />
     34                  <xsl:with-param name='serviceName' select='$serviceName' />
     35                </xsl:apply-templates>     
     36          </xsl:when>           
    3137              <xsl:otherwise>
    3238                <c>
    33                   Tabletop XML output only supports a VList of documentNode (no recursion):
    34                   <xsl:value-of select="name()" />
     39                  Tabletop XML output only supports:
     40            (i) a VList of documentNode (no recursion),
     41            OR
     42            (ii) a VList of classifierNode, assuming subsequent documentNode entries generate no XML output.
     43
     44            The node that the XSLT was unable to be match is:
     45                      <xsl:value-of select="name()" />
    3546                </c>
    3647              </xsl:otherwise>
    3748            </xsl:choose>
    38           </r>
     49      </r>     
    3950        </xsl:for-each>
    4051      </xsl:when>
     52   
    4153      <xsl:otherwise>
    4254    Tabletop XML output only supports VList childType
     
    8496        <xsl:value-of select="@name" />
    8597      </xsl:variable>
    86       <xsl:text> </xsl:text>
     98      <xsl:text> </xsl:text>   
    8799      <xsl:call-template name="processNodeChildrenTabletop">
    88100        <xsl:with-param name='collName' select='$collName' />
Note: See TracChangeset for help on using the changeset viewer.