Subject: [xsl] xsl: display only a specified node... From: Jan Krattiger <jan.krattiger@xxxxxxxx> Date: Mon, 14 Oct 2002 15:29:13 +0200 |
hi folks i'm not able to find a solution for that...and my xsl knowledge isn't that good, so here's the situation: XML: <sequence stype="ondemand" broadcastID="00"> <mark ID="m0001" name="testh" time="0:00:00"> <index> <chapter lang="en" text="test1"/> </index> </mark> <mark ID="m0002" name="" time="0:00:20" /> <mark ID="m0003" time="0:00:40" /> <mark ID="m0004" time="0:01:00" /> <mark ID="m0005" time="0:01:20"> <index> <chapter lang="en" text="test2"/> </index> </mark> </sequence> this xml is used for the data itself and to build up a tree menu structure like this (that works w/o problems): frameset ------------------------------------------------------- tree menu frame details frame --------------------------- ------------------------- |sequence | | | | - mark 0:00:00 (m0001) | | | | - index | | | | - mark 0:00:20 (m0002) | | | | - mark 0:00:40 (m0003) | | | | - mark 0:01:00 (m0004) | | | | - mark 0:01:20 (m0005) | | | | - index | | | --------------------------- ------------------------- functionality: i click on sequence, and on the details frame the stype and broadcastID attributes are shown (that works w/o problems). i click on any mark, and the mark info (id / name / time) is shown in the details frame. (that works w/o problems) i click on index under mark (m0001) and ONLY the index, that's belong to m0001 should be displayed, but i get both... the one from m0001 and m0005. here's the xsl: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="page"/> i get this from a asp script, so i know which "tree element" was clicked <xsl:param name="markid"/> i get this from a asp script, so i know which mark was clicked <xsl:template match="/"> ... <body> <xsl:apply-templates /> </body> ... </xsl:template> <xsl:template match="sequence"> <xsl:if test="$page = 'sequence'"> ... <xsl:value-of select="@broadcastID" /> ... </xsl:if> <xsl:apply-templates /> </xsl:template> <xsl:template match="mark"> <xsl:if test="$page = 'mark'"> <xsl:if test="@ID=$markid"> ... <xsl:value-of select="@name" /> ... </xsl:if> </xsl:if> <xsl:apply-templates /> </xsl:template> <xsl:template match="index"> <xsl:if test="$page = 'index'"> <xsl:apply-templates/> </xsl:if> </xsl:template> <xsl:template match="chapter"> ... <xsl:value-of select="@text"/> ... </xsl:template> the problem is that i can't really "identify" the index... so i can't check which one the xsl should display it should only show the info that belongs to the clicked tree-element. and not all the childs from all the marks as here in the bad example. and as always please excuse my poor english... thanks a lot Jan M. Krattiger Software Developer Unit.Net AG Thurgauerstrasse 54 CH - 8050 Zurich Email: jan.krattiger@xxxxxxxx Web: http://unit.net XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Hierearchy navigation in , Scott Bronson | Thread | Re: [xsl] xsl: display only a speci, Jörg Heinicke |
Re: [xsl] Retrieving unknown attrib, Peter Davis | Date | [xsl] xsl:processing-instruction, DPawson |
Month |