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

Re: How do I skip an element?

Subject: Re: How do I skip an element?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 5 May 1999 10:56:31 +0100 (BST)
xsl skip an element

}  XML
}  <data>
}  <row><column1>text1a</column1><column2>text1b</column2><column3>text3a</column3></row>
}  <row><column1>text2a</column1><column2>text2b</column2><column3>text3b</column3></row>
}  </data>
}  I want
}  <table>
}  <tr>
}  <th>column1</th>
}  <th>column3</th>
}  </tr>
}  <tr>
}  <td>text1a</td>
}  <td>text1c</td>
}  </tr>
}  <tr>
}  <td>text2a</td>
}  <td>text2c</td>
}  </tr>
}  </table>

Is that _really_ what you want? where is text1c supposed to come from,
which isn't in the source file?

I suspect that given the input


you want to cut out column 2 and fabricate a header row, like so:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

In case that is what you meant, it was generated by


<xsl:template match="data">
<xsl:for-each select="row[1]/*[not(position() = 2)]">
<th><xsl:value-of select="qname(.)"/></th>

<xsl:template match="row">

<xsl:template match="row/*[position()=2]">

<xsl:template match="row/*[not(position() = 2)]">


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

Current Thread


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.
First Name
Last Name
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.