[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Conditionally create an html table based upon exi
Rod,
At 02:02 PM 3/30/2010, you wrote: I need to create a table if either the second and third "apply-template" directives return nodes, and otherwise create nothing . Bind them to a variable so: <xsl:variable name="results"> <xsl:apply-templates .../> <xsl:apply-templates .../> </xsl:variable> then generate your table if $results has any content. In XSLT 1.0 the easiest way is to test for non-whitespace text: <xsl:if test="normalize-space($results)"> <table border="1" width="85%" > <xsl:copy-of select=$results"/> </table> </xsl:if> In XSLT 2.0 you can be smarter about what's inside $results. You can also split $results into two variables if you need to handle the two apply-templates results separately. Good luck, Wendell "Fiscal Year" is the Dimension name and C02 and C09 are the "Column Group Name"s, but the table creation is not quite correct as the rows are not displayed correctly. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|