Subject: [xsl] add elements From: "Naraschewski, E." <e.naraschewski@xxxxxxxxxxxxx> Date: Wed, 4 Sep 2002 14:11:25 +0200 |
Hello, thank you Joerg, now I got all the tags. I get the right result when using saxon and the task line. But I don`t get the result using xml-spy. Are there any options to change? I start my xml file with this template: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> but still don`t know how to continue, what to use where. This is my xml file. It consists of numerous entries. Some entries do have the Element <UbNummer> and some don`t. I want to ask something like that: Every entry which does not contain the element <UbNummer> gets a new Element <texteintrag>. <entry> <MAT matid="687714453w"> <Sachgebiete></Sachgebiete> <Fundstelle> <Band>1</Band> <Lektion>1</Lektion> <LektionsKategorie>X</LektionsKategorie> <AbsolutePos>1</AbsolutePos> <IndividPos>10816</IndividPos> <UbNummer>1</UbNummer> </Fundstelle> </MAT> <LO><LO> </entry> ... This is the result I would like to get: <entry> <texteintrag> <MAT matid="687714453w"> <Sachgebiete></Sachgebiete> <Fundstelle> <Band>1</Band> <Lektion>1</Lektion> <LektionsKategorie>X</LektionsKategorie> <AbsolutePos>1</AbsolutePos> <IndividPos>10816</IndividPos> </Fundstelle> </MAT> <LO></LO> </texteintrag> </entry> Thanks in advance. Elke ******************************************************* Elke Naraschewski - Ernst Klett Verlag GmbH - Leistungscenter Mediengestaltung Rotebühlstr. 77 - 70178 Stuttgart Tel.: 0711/6672-1116 - Fax: 0711/6672-2023 - E-mail: 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) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: Getting the XPath of , Mike Brown | Thread | Re: [xsl] add elements, Mike Brown |
RE: [xsl] Getting the XPath of a no, Michael Kay | Date | [xsl] Ann: Updated world-wide XSLT/, G. Ken Holman |
Month |