[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Need Help in Creating folder tree(html) from xtm document using xslt


Subject: [xsl] Need Help in Creating folder tree(html) from xtm document using xslt
From: "velmurugan mariappan" <vel_gun@xxxxxxxxxxx>
Date: Thu, 07 Aug 2003 13:41:58 -0500

HI everyone,
     I need help in creating a folder tree from an xtm document using xslt.

My xtm document is like this.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink" id="xtm of the ecosystem">
<!-- ..................... THE TOPIC MAP TOPIC ..................... -->
<topic id="ecosystem-xtm-topic">
<subjectIdentity>
<subjectIndicatorRef xlink:href="#xtm of the ecosystem" />
</subjectIdentity>
<baseName>
<baseNameString>
topic map for the ecosystem
</baseNameString>
</baseName>
</topic>


<!-- ..................... FIRST LEVEL TOPIC TYPES ..................... -->
<topic id="ecosystem">
	<baseName>
		<baseNameString>
			Ecosystem
		</baseNameString>
	</baseName>
</topic>

<topic id="food chain">
	<baseName>
		<baseNameString>
			food chain
		</baseNameString>
	</baseName>
</topic>

<topic id="living part">
	<baseName>
		<baseNameString>
			Living part
		</baseNameString>
	</baseName>
</topic>

<topic id="non-living part">
	<baseName>
		<baseNameString>
			Non-Living Part
		</baseNameString>
	</baseName>
</topic>

<!-- ..................... SECOND LEVEL TOPIC TYPES ..................... -->
<topic id="animal">
<instanceOf>
<topicRef xlink:href="#living part" />
</instanceOf>
<baseName>
<baseNameString>
animal
</baseNameString>
</baseName>
</topic>


<topic id="frog-hawk food chain">
	<instanceOf>
		<topicRef xlink:href="#food chain" />
	</instanceOf>
	<baseName>
		<baseNameString>
			frog-hawk food chain
		</baseNameString>
	</baseName>
</topic>

<topic id="plant">
	<instanceOf>
		<topicRef xlink:href="#living part" />
		</instanceOf>
		<baseName>
			<baseNameString>
				plant
			</baseNameString>
		</baseName>
</topic>

<topic id="air">
	<instanceOf>
		<topicRef xlink:href="#non-living part" />
	</instanceOf>
	<baseName>
		<baseNameString>
			air
		</baseNameString>
	</baseName>
</topic>

<topic id="water">
	<instanceOf>
		<topicRef xlink:href="#non-living part" />
	</instanceOf>
	<baseName>
		<baseNameString>
			water
		</baseNameString>
	</baseName>
</topic>

<topic id="soil">
	<instanceOf>
		<topicRef xlink:href="#non-living part" />
	</instanceOf>
	<baseName>
		<baseNameString>
			soil
		</baseNameString>
	</baseName>
</topic>

<!-- ..................... THIRD LEVEL TOPICS ..................... -->
<topic id="animal-carnivore">
	<instanceOf>
		<topicRef xlink:href="#animal" />
	</instanceOf>
	<baseName>
		<baseNameString>
			animal-carnivore
		</baseNameString>
	</baseName>
</topic>

<topic id="plant-carnivore">
	<instanceOf>
		<topicRef xlink:href="#plant" />
	</instanceOf>
	<baseName>
		<baseNameString>
			plant-carnivore
		</baseNameString>
	</baseName>
</topic>

<topic id="animal-herbivore">
	<instanceOf>
		<topicRef xlink:href="#animal" />
	</instanceOf>
	<baseName>
		<baseNameString>
			animal-herbivore
		</baseNameString>
	</baseName>
</topic>

<topic id="plant-herbivore">
	<instanceOf>
		<topicRef xlink:href="#plant" />
	</instanceOf>
	<baseName>
		<baseNameString>
			plant-herbivore
		</baseNameString>
	</baseName>
</topic>

<topic id="bird">
	<instanceOf>
		<topicRef xlink:href="#animal" />
	</instanceOf>
	<baseName>
		<baseNameString>
			bird
		</baseNameString>
	</baseName>
</topic>

<topic id="reptile">
	<instanceOf>
		<topicRef xlink:href="#animal" />
	</instanceOf>
	<baseName>
		<baseNameString>
			reptile
		</baseNameString>
	</baseName>
</topic>

-------------------------------------------
I need the HTML output as

topic map for the ecosystem
  EcoSystem
  Food Chain
     frog-hawk food chain
  Living Part
     Animal
        animal-carnivore
        animal-herbivore
        bird
        reptile
     Plant
        plant-carnivore
        plant-herbivore

  Non-Living part
     Air
     water
     soil



Any Idea about how to do it. It would be much helpful.

thanks a lot.

Regards,
Vel

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list




Current Thread