XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 25th, 2004, 10:08 AM
nihaarika2002 nihaarika2002 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 49 nihaarika2002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Tree view structure as output - using xsl - from xml tree

hi

could u anyone tell me
how to get tree view structure - using xsl code
from given xml.


xml::: code below
==================
<?xml version="1.0"?>
<TreeRoot>

<Term>
one
<LowerTerm1>
two
</LowerTerm1>
<LowerTerm1>
three
</LowerTerm1>
<LowerTerm1>
four
<LowerTerm2>
five
</LowerTerm2>
<LowerTerm2>
six
</LowerTerm2>
</LowerTerm1>
</Term>


</TreeRoot>


===================

and i would like to have out put

+one -if i click this it should expand and show below
+two
+three
+four
+five
+six
==============
just like opening .xml file in browser


i did some code - but it is limited to only one <Term> but i want to have n-number of <Term> s


i paste my xsl code below
=========================

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="xml" omit-xml-declaration="yes" indent="yes" encoding="utf-8" cdata-section-elements="DrugName SynonymName CheckName SynonymType CompoundName ActionName ActionTree CurrDevCompanyName CurrDevParentName CurrDevDrugCompanyRelationship Country DevelopmentStatus CurrDevDevelopmentStatusCode CurrDevIndicationName IndicationTree AssigneeList InventorsList ActionName ActionTree IndicationName IndicationTree "/>



<xsl:template match="/">

<Term>
<xsl:value-of select="TreeRoot/Term/text()"/>
<LowTerm1>
<xsl:value-of select="TreeRoot/Term/LowerTerm1/text()"/>
<LowTerm2>
<xsl:value-of select="TreeRoot/Term/LowerTerm1/LowerTerm2/text()"/>

</LowTerm2>
</LowTerm1>

</Term>


</xsl:template>


</xsl:stylesheet>
==========================

any help or suggestion much appreciated

regards
niha

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Tree view structure as output - using xsl - from xml tree


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT