我正在尝试创建一系列资源框,这些资源框将作为图像和标题显示在页面上.

选择(单击)图像(资源)时,将显示包含资源简要描述的下拉框,以及用于获取更多信息的按钮.

再次单击资源时,它将显示资源的完整描述,以及两个按钮:一个用于删除信息,另一个用于较少信息.

我已经使用XSLT根据用户输入资源时提供的XML为每个资源选择内容.
XSLT:
<div id="newContainer">
<div class="hidden">
<xsl:value-of select="/Properties/Data/Group[@Name='Header']/Datum[@Name='Title']"/>
</div>
<ul id="initialContent">
<xsl:for-each select="/Properties/Data/Group[@Name='List Item']">
<li>
<xsl:attribute name="class">
<xsl:value-of select="Datum[@Name='Title']"/>
</xsl:attribute>
<a href="#">
<img>
<xsl:attribute name="src">
<xsl:value-of select="Datum[@Name='Source']"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Datum[@Name='Alt']"/>
</xsl:attribute>
</img>
<xsl:value-of select="Datum[@Name='Title']"/>
</a>
</li>
</xsl:for-each>
</ul>
</div>
<div id="briefDescription">
<xsl:if test="@class=Datum[@Name='Title']">
<xsl:for-each select="/properties/Data/Group[@Name='List Item']">
<a>
<xsl:value-of select="Datum[@Name='Description']"/>
<xsl:value-of select="normalize-space(substring(title,1,50))" disable-output-escaping="yes"/>
<xsl:if test="string-length(title) > 50">..</xsl:if>
</a>
</xsl:for-each>
</xsl:if>
</div>
Run Code Online (Sandbox Code Playgroud)
XML:
<Data>
<Datum Exposed="true" ID="ResourceTitle" Name="Title" Type="String">Title</Datum>
<Group Exposed="true" ID="Resource" Name="List Item" Replicatable="true">
<Datum Exposed="true" …Run Code Online (Sandbox Code Playgroud)