[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6939] XSL added to display one / many items
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [6939] XSL added to display one / many items |
Date: |
Sun, 06 Feb 2011 20:56:53 +0000 |
Revision: 6939
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6939
Author: peturbjorn
Date: 2011-02-06 20:56:53 +0000 (Sun, 06 Feb 2011)
Log Message:
-----------
XSL added to display one / many items
Added Paths:
-----------
branches/dev-bim2/property/templates/base/bim_showSingleItem.xsl
branches/dev-bim2/property/templates/base/bim_showitems.xsl
Added: branches/dev-bim2/property/templates/base/bim_showSingleItem.xsl
===================================================================
--- branches/dev-bim2/property/templates/base/bim_showSingleItem.xsl
(rev 0)
+++ branches/dev-bim2/property/templates/base/bim_showSingleItem.xsl
2011-02-06 20:56:53 UTC (rev 6939)
@@ -0,0 +1,76 @@
+
+ <xsl:template match="/">
+ <div class="bimObject">
+ <xsl:apply-templates select="*">
+
+ </xsl:apply-templates>
+ </div>
+
+ </xsl:template>
+ <xsl:template match="*">
+ <div>
+
+ <!-- tests if children have no children -->
+ <!--
+ <xsl:choose>
+
+ <xsl:when test="count(*[not(*)]) = 0 and count(*)=0">
+ <dl>
+ <xsl:call-template
name="childElements"/>
+ </dl>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1><xsl:value-of select="name()"/></h1>
+ </xsl:otherwise>
+ </xsl:choose>
+ -->
+ <xsl:choose>
+ <xsl:when test="not(*)">
+
+ <dl>
+
+ <dt><xsl:value-of select="name()"/></dt>
+ <dd><xsl:value-of select="."/></dd>
+
+ </dl>
+
+ </xsl:when>
+ <xsl:otherwise>
+ <h1><xsl:value-of select="name()"/></h1>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="@*">
+ <h2>Xml attributes</h2>
+ <dl>
+ <xsl:for-each select="@*">
+ <dt><xsl:value-of select="name()"/></dt>
+ <dd><xsl:value-of select="."/></dd>
+ </xsl:for-each>
+ </dl>
+ </xsl:if>
+
+ <!--
+ <xsl:choose>
+ <xsl:when test="not(*)">
+ <dl>
+ <dt><xsl:value-of select="name()"/></dt>
+ <dd><xsl:value-of select="."/></dd>
+ </dl>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1><xsl:value-of select="name()"/></h1>
+ </xsl:otherwise>
+ </xsl:choose>
+ -->
+
+
+ <xsl:apply-templates select="*">
+
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+ <xsl:template name="childElements" >
+ <dt><xsl:value-of select="name()"/></dt>
+ <dd><xsl:value-of select="."/></dd>
+
+ </xsl:template>
Added: branches/dev-bim2/property/templates/base/bim_showitems.xsl
===================================================================
--- branches/dev-bim2/property/templates/base/bim_showitems.xsl
(rev 0)
+++ branches/dev-bim2/property/templates/base/bim_showitems.xsl 2011-02-06
20:56:53 UTC (rev 6939)
@@ -0,0 +1,26 @@
+ <xsl:template match="bimitems">
+ <div> Objects </div>
+ <div class="showModels">
+ <table id="bimItems">
+ <tr>
+ <th>Database id</th>
+ <th>Guid</th>
+ <th>type</th>
+ </tr>
+ <xsl:for-each select="bimItems/item">
+ <tr>
+ <td><xsl:value-of
select="databaseId"/></td>
+ <td class="guid"><xsl:value-of
select="guid"/></td>
+ <td><xsl:value-of
select="type"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ <script type="text/javascript">
+ if (typeof YUI != 'undefined') {
+ YUI().use('node-base', function(Y) {
+ Y.on("load", doDelegateViewItem);
+ });
+ }
+ </script>
+ </xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6939] XSL added to display one / many items,
Petur Thorsteinsson <=