|
Subject: Re: [xsl] Dmoz xml structure sort From: Mukul Gandhi <mukulgandhi2003@xxxxxxxxxxx> Date: Sun, 18 Apr 2004 14:54:37 +0100 (BST) |
Hi John,
If I understood the problem correctly, this could be
the solution.
<xsl:for-each select="Topic">
<xsl:if test="not(narrow)">
<xsl:copy-of select="." />
</xsl:if>
</xsl:for-each>
Regards,
Mukul
--- John Hamman <John@xxxxxxxxxxxxxxxxx> wrote: > Hi
all.
> I have a navigational site tree xml page similar to
> Dmoz.org.
> And its made up like this below. I am new to xpath
> and am having problems
> finding a solution to this.
>
> My file looks similar to this.
>
> <Topic id="Base">
> <tag catid="1"/>
> <Title local="en-US">Home</Title>
> <narrow resource="Base/General_Information"/>
> <narrow resource="Base/StudentLife"/>
> <narrow resource="Base/Missions"/>
> <narrow resource="Base/Community"/>
> <narrow resource="Base/Academics"/>
> <narrow resource="Base/News"/>
> </Topic>
> <Topic id="Base/General_Information">
> <tag catid="2"/>
> <Title local="en-US">General Information</Title>
> <narrow
> resource="Base/General_Information/About_us"/>
> <narrow
> resource="Base/General_Information/Contact_us"/>
> <narrow
>
resource="Base/General_Information/Directors_Letter"/>
> <narrow
> resource="Base/General_Information/History"/>
> <narrow
>
resource="Base/General_Information/What_We_Beleive"/>
> <narrow
>
resource="Base/General_Information/Staff_Directory"/>
> </Topic>
> <Topic id="Base/General_Information/About_us">
> <tag catid="8"/>
> <Title local="en-US">About Us</Title>
> </Topic>
> <Topic id="Base/General_Information/Contact_us">
> <tag catid="9"/>
> <Title local="en-US">Contact Us</Title>
> </Topic>
> ...
> ...
> ...
>
>
> And I want to acheave results like this if I had a
> dynamic variable like
> "Base/General_Information/About_us"
>
> <Topic id="Base/General_Information/About_us">
> <tag catid="8"/>
> <Title local="en-US">About Us</Title>
> </Topic>
> <Topic id="Base/General_Information/Contact_us">
> <tag catid="9"/>
> <Title local="en-US">Contact Us</Title>
> </Topic>
> <Topic
> id="Base/General_Information/Directors_Letter">
> <tag catid="10"/>
> <Title local="en-US">Letter From the
> Director</Title>
> </Topic>
> <Topic id="Base/General_Information/History">
> <tag catid="11"/>
> <Title local="en-US">History</Title>
> </Topic>
> <Topic
> id="Base/General_Information/What_We_Beleive">
> <tag catid="12"/>
> <Title local="en-US">What We Beleive</Title>
> </Topic>
> <Topic
> id="Base/General_Information/Staff_Directory">
> <tag catid="13"/>
> <Title local="en-US">Staff Directory</Title>
> </Topic>
>
> Can someone point me in the right direction?
> john
>
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Dmoz xml structure sort, John Hamman | Thread | RE: [xsl] Dmoz xml structure sort, John Hamman |
| [xsl] Dmoz xml structure sort, John Hamman | Date | RE: [xsl] Dmoz xml structure sort, John Hamman |
| Month |