RE: [xsl] how to get rid of tag names

Subject: RE: [xsl] how to get rid of tag names
From: "Smirnov, Anatoliy" <anatoliy.smirnov@xxxxxxxxxxx>
Date: Mon, 5 May 2003 10:05:52 -0400

Sorry about the confusion.
The source XML file is

    <p> A </p>
      <dt> B </dt>
      <dt> C </dt>
    <p> D </p>
        <dt> E </dt>
    <p> F </p>

and the output I need is

   <HEADER> Header1 </HEADER>
   <HEADER> Header2 </HEADER>

My xsl:

<xsl:stylesheet version="1.0"
<xsl:template match="html/body">
<xsl:template match="html/body/h">
     <xsl:value-of select="."/>

gives me wrong result(numbers for reference only):

2   <ROW>
3   <HEADER> Header1 </HEADER>
4    <BODY> ABC 
5      <ROW>
6        <HEADER> Header2 </HEADER>
7        <BODY> DEF </BODY> 
8      </ROW>
9      DEF
10  </BODY>
11  </ROW> 
12  ABC
13  <ROW>
14    <HEADER> Header2 </HEADER>
15    <BODY> DEF </BODY>
16  </ROW>
17  DEF

I don't need lines 5-9,12,17.
I guess lines 12,17 are coming from the first template invocation
but without the first template I won't have top-level element <ROWSET> ? 
And I don't see why lines 5-9 are output?

Thank you.
Anatoliy Smirnov

-----Original Message-----
From: Andrew Watt [mailto:andrew@xxxxxxxxxxxxxx]
Sent: Friday, May 02, 2003 4:00 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] how to get rid of tag names

At 13:41 01/05/2003 -0400, you wrote:
>Sorry,I put abridged version of my source file in my question. The diff is
>that I have multiple tags under BODY node, I need all of them for every <h>
>node until the next <h> node:


The source XML you provided when you first asked your question and the 
source in your follow-up questions (part off list) have different 
structures, including different element names. I am not clear precisely 
what structure you are wanting to transform.

Please provide the relevant XML source that you want to transform and the 
desired output from that XML source. Then, hopefully, one of us can help 
you find a solution.

Andrew Watt

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread