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

Antw: RE: flatten a hierachy and change positions

Subject: Antw: RE: flatten a hierachy and change positions
From: "Elke Naraschewski" <e.naraschewski@xxxxxxxxxxxxx>
Date: Thu, 25 Sep 2003 11:54:44 +0200
hierachy
Hallo Jenni, Andreas, Michael, 
my Mailsystem had a Problem so I recieved your answers just a few minutes ago. Thanks for your anwsers.
This is just an extract from a longer document.
I forgot the closing g1... And I should have added, like Andreas did, a root Element. g1 comes first because its content is the main text and u1 ist the headline. My root is <handbuch><deckblatt>
<marginalie></marginalie>
</deckblatt
<g1>....
</handbuch>

My hierachy needs to be flattened because it has to be imported into a content management system. I have to change the names:

for Example:

<xsl:template match="g1">
<field name="g1" type="text_plain">
<xsl:apply-templates/>
</field>
</xsl:template>

<xsl:template match="u1">
<field name="u1" type="text_plain">
<xsl:apply-templates/>
</field>
</xsl:template>

and than I thought about how to put the Elemtents out of their hierachy in a special order. That's where I got stuck.

Elke


****************************************************************************************************
Elke Naraschewski - Ernst Klett Verlag GmbH Stuttgart - Leistungscenter
Mediengestaltung - Rotebühlstr.77 - 70178 Stuttgart
Tel.: 0711/6672-1116 - Fax: 0711/6672-2023 - eMail: e.naraschewski@xxxxxxxxxxxxx
Stuttgart HRB 10746 Verleger: Dr.h.c. Michael Klett - Geschäftsführer:
Johannes Leßmann - Harald Melcher - Dr. Tilmann Michaletz - Dr. Wolf
Unkelbach (Vorsitz)
****************************************************************************************************

>>> mhk@xxxxxxxxx 24.09.03 18:39:23 >>>
> I looked up the list and books but still don't get a clue 
> which method to choose.  I want to flatten a hierachy and 
> change positions, the way the following example shows:
> 
> I have:
> 
<handbuch>
<deckblatt>
<marginalie></marginalie>
</deckblatt
> <g1>
> <u1><s></s></u1>
></g1>
> <g2>
> <u2></u2>
> </g2>
</handbuch>
> 
> I need:
> 
> <u1></u1>
> <s></s>
> <g1></g1>
> <u2></u2>
> <g2></g2>
> 

It's not possible (for me at any rate) to deduce from this input and
output what your transformation rules are. Why exactly does <u1> come
first in your output and <g1> come third? And where is the closing </g1>
tag?

Michael Kay


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



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


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.