Changeset 693
- Timestamp:
- 09/14/10 20:51:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/xsl/mdset2view.xsl
r689 r693 22 22 23 23 <!-- <xsl:param name="format" select="'table'" /> table|list|detail --> 24 <xsl:param name="cols" > 24 <xsl:param name="cols" >Id,Title,Location 25 <!-- 25 26 <col label="id">Id</col> 26 27 <col label="id">idno</col> … … 32 33 <col label="lang" >language</col> 33 34 35 --> 34 36 </xsl:param> 35 37 … … 38 40 <xsl:text>MDRecordSet </xsl:text> 39 41 </xsl:param> 42 43 <xsl:variable name="columns" select="tokenize($cols,',')"/> 40 44 41 45 <xsl:template name="continue-root" > … … 96 100 <table class="show"> 97 101 <thead><tr><th>pos</th> 102 <!-- 103 <xsl:for-each select="$cols/col" > 98 104 <xsl:for-each select="distinct-values($cols/col/@label)" > 99 105 <th><xsl:value-of select="." /></th> 100 </xsl:for-each> 106 </xsl:for-each> 107 --> 108 <xsl:for-each select="$columns"> 109 <th><xsl:value-of select="."/></th> 110 </xsl:for-each> 111 101 112 </tr></thead> 102 113 <tbody> … … 120 131 </td> 121 132 <xsl:variable name="curr_cmd" select="." /> 133 <!-- <xsl:for-each select="$cols/col" > 134 <td ><xsl:value-of select="$curr_cmd//*[name()=current()]" /></td> 122 135 <xsl:for-each select="distinct-values($cols/col/@label)" > 123 <td ><!-- <xsl:value-of select="$curr_cmd//*[name()=current()]" /> --> 124 <xsl:for-each select="$cols/col[@label=current()]" > 125 <xsl:variable name="curr_col_xpath" select="text()" /> 126 <!-- necessary to establish correct context for evaluation --> 127 <!-- <xsl:message><xsl:value-of select="$curr_col_xpath" /></xsl:message> --> 136 <td > 137 <xsl:value-of select="$curr_cmd//*[name()=current()]" /> 138 <xsl:for-each select="$cols/col[@label=current()]" > 139 <xsl:variable name="curr_col_xpath" select="text()" /> 140 141 <xsl:message><xsl:value-of select="$curr_col_xpath" /></xsl:message> 142 128 143 <xsl:for-each select="$curr_cmd" > 129 144 <xsl:value-of select="saxon:evaluate(concat('.//', $curr_col_xpath))" /> … … 132 147 </td> 133 148 </xsl:for-each> 149 --> 150 151 <xsl:for-each select="$columns"> 152 <td ><xsl:value-of select="$curr_cmd//*[name()=current()]" /></td> 153 </xsl:for-each> 134 154 </tr> 135 155 </xsl:template>
Note: See TracChangeset
for help on using the changeset viewer.