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

Re: FW: Double output

Subject: Re: FW: Double output
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 9 Mar 2003 23:11:37 GMT
Re: FW:  Double output

> When I open the xml file in MSIE 6.28,
It's best to debug by looking at the generated html file rather than
looking what it looks like in a browser.

In this case you are going to generate invalid html.

  <xsl:template match="SubSection">
    <h4><xsl:apply-templates/></h4>


You are placing the result of applying templates to the subsection
inside an h4 element. There are two such children an ssHdr and a p.
The ssHdr itself generates an h4 so you will end up with an h4 inside an
h4 which is an error  but the browser probably renders it as an h4.
Then still inside the h4 you will get the result of applying templates
to the p. You have the same problem with the next line:  you are
putting all textpara's inside a p from your subsection template
and then putting each one inside a nested p coming from the TextPara
template.

You just want something like:

  <xsl:template match="SubSection">
   <xsl:apply-templates/>
  </xsl:template>


  <xsl:template match="ssHdr">
  	<h4><xsl:apply-templates/></h4>
  </xsl:template>

  <xsl:template match="TextPara">
  	<p><xsl:apply-templates/></p>
  </xsl:template>

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


Current Thread
  • Double output
    • Jack Cane - Sun, 9 Mar 2003 15:59:41 -0500 (EST)
      • <Possible follow-ups>
      • Jack Cane - Sun, 9 Mar 2003 16:34:17 -0500 (EST)
        • David Carlisle - Sun, 9 Mar 2003 18:08:39 -0500 (EST) <=
        • Michael Kay - Mon, 10 Mar 2003 04:01:05 -0500 (EST)
      • Ross Ken - Sun, 9 Mar 2003 20:27:29 -0500 (EST)
        • Jack Cane - Sun, 9 Mar 2003 21:21:39 -0500 (EST)
        • Kurt Cagle - Mon, 10 Mar 2003 01:30:12 -0500 (EST)

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.