[xsl] select 1st occurence of element tag name

Subject: [xsl] select 1st occurence of element tag name
From: Nikolas.Nehmer@xxxxxxxxxxx (Nikolas Nehmer)
Date: Sun, 15 Feb 2004 11:07:59 +0100
Hi,

what I want to do is to develope a generic default visualizer for my
application. I have several XML documents with a similar structure. What
I need is a select construct which selects the first occurence of an
element tag name (tag name is not fixed) for all direct children of the
root. For better understanding a little example:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../XSL/person.xsl"?>
<Person xmlns="http://www.iese.fhg.de/Person";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.iese.fhg.de/Person ../XSD/Person.xsd">
	<firstname>Nikolas</firstname>
	<lastname>Nehmer</lastname>
	<author href="../../Publication/DipThesis/XML/dipThesis_1.xml"/>
	<author
href="../../Publication/ProjThesis/XML/projThesis_1.xml"/>
	<author href="../../Publication/OnlineDoc/XML/onlineDoc_1.xml"/>
	<author href="../../Publication/PhDThesis/XML/phDThesis_1.xml"/>
	<employee href="../../Organisation/XML/organisation_TUKL.xml"/>
</Person>


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../XSL/publication.xsl"?>
<Publication xmlns="http://www.iese.fhg.de/Publication";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.iese.fhg.de/Publication
../XSD/Publication.xsd">
	<title>Durchgängige Entwicklung großer verteilter Systeme - Die
SILICON-Fallstudie</title>
	<date>2003-02-26</date>
	<abstract>abstract...</abstract>
	<rating>top</rating>
	<location>http://www.uni-kl.de</location>
	<confidentiality>top secret</confidentiality>
	<author href="../../Person/XML/person_ChristianPeper.xml"/>
</Publication>


The XSL Transformation should now extract all tag names but only 1 time,
so author should be selected only once. I need this functionality to
build the table headers of a html table.

Best regards,
Nick


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


Current Thread