[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Dmoz xml structure sort

Subject: Re: Dmoz xml structure sort
From: Mukul Gandhi <mukulgandhi2003@xxxxxxxxxxx>
Date: Sun, 18 Apr 2004 14:54:37 +0100 (BST)
dmoz xml
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.