Changeset 1495 for MDService2/trunk/MDService2/src/xsl/test2view.xsl
- Timestamp:
- 08/25/11 20:21:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/xsl/test2view.xsl
r1488 r1495 27 27 <xsl:template match="a"> 28 28 29 <xsl:variable name="specific_prefix" select="if (contains(@href,'query')) then 'recordset/htmlpage/' else ''" /> 30 31 <xsl:variable name="data" > 32 <xsl:choose> 33 <xsl:when test="@class='request count'"> 34 <xsl:copy-of select="document(concat($base_url,@href))" /> 35 </xsl:when> 36 <xsl:when test="@class='query count'"> 37 <xsl:copy-of select="document(concat($base_url, 'recordset/xml/', @href))" /> 38 </xsl:when> 39 <xsl:when test="@class='query'"> 40 <xsl:copy-of select="document(concat($base_url, 'recordset/htmltable/', @href))" /> 41 </xsl:when> 42 <xsl:otherwise> 43 <xsl:copy-of select="document(concat($base_url, @href))" /> 44 </xsl:otherwise> 45 </xsl:choose> 46 </xsl:variable> 47 48 29 49 <div class="cmds-ui-block" > 30 50 <div class="ui-widget-header"> 31 <xsl:value-of select="@class" />: <xsl:copy-of select="." /> [<a href="{concat($base_url, @href)}" ><xsl:value-of select="@href" /></a>]51 <xsl:value-of select="@class" />: <xsl:copy-of select="." /> [<a href="{concat($base_url,$specific_prefix,@href)}" ><xsl:value-of select="@href" /></a>] 32 52 </div> 33 53 34 54 <div class="ui-widget-content"> 35 55 <xsl:choose> 36 <xsl:when test="@class='requestcount'"> 37 <xsl:variable name="data" select="document(concat($base_url,@href))" /> 38 <xsl:value-of select="count($data//*)" /> 56 <xsl:when test="exists($data/diagnostics)"> 57 <span class="error" > 58 <xsl:value-of select="$data/diagnostics/diag:diagnostic/diag:message" /> 59 </span> 39 60 </xsl:when> 40 <xsl:when test="@class='query'"> 61 <xsl:when test="@class='request count'"> 62 root: <xsl:value-of select="$data/*/name()" />|<xsl:value-of select="count($data//*)" />| 63 </xsl:when> 64 <xsl:when test="@class='query count'"> 65 <xsl:value-of select="$data//numberOfRecords" /> 66 </xsl:when> 67 68 <!-- <xsl:when test="@class='query'"> 41 69 <xsl:variable name="data" select="document(concat($base_url,'recordset/htmltable/', @href))" /> 42 70 <xsl:copy-of select="$data" /> 43 </xsl:when> 44 <xsl:when test="@class='query count'"> 45 <xsl:variable name="data" select="document(concat($base_url,'recordset/xml/', @href))" /> 46 <xsl:value-of select="$data//numberOfRecords" /> 47 </xsl:when> 71 </xsl:when> --> 48 72 <xsl:otherwise> 49 <xsl:apply-templates select="document(concat($base_url,@href))" mode="process-query"/> 73 <!-- <xsl:apply-templates select="$data" mode="process-result"/>--> 74 <xsl:copy-of select="$data" /> 50 75 </xsl:otherwise> 51 76 </xsl:choose> … … 61 86 </xsl:template> 62 87 63 <xsl:template match="*|@*" mode="process- query" >88 <xsl:template match="*|@*" mode="process-result" > 64 89 <xsl:copy> 65 <xsl:apply-templates select="node()|@*" mode="process- query" />90 <xsl:apply-templates select="node()|@*" mode="process-result" /> 66 91 </xsl:copy> 67 92 </xsl:template> … … 73 98 <message>Exception occurred: Connection refused: connect</message> 74 99 --> 75 <xsl:template match="diagnostics" mode="process- query" >100 <xsl:template match="diagnostics" mode="process-result" > 76 101 <div class="error" > 77 102 <xsl:value-of select="diag:diagnostic/diag:message" />
Note: See TracChangeset
for help on using the changeset viewer.