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

how to force start and end tags

Subject: how to force start and end tags
From: "Tassos Anastasiou" <tassos123@xxxxxxx>
Date: Fri, 28 Nov 2003 09:34:10 -0800
tassos anastasiou
Hi all,

I have the following simple XSL:

<xsl:template match="para">
     <xsl:element name="p">
         <xsl:apply-templates/>
     </xsl:element>
</xsl:template>

and appropriate templates to handle <row> and <entry>

The following XML fragment

             <row>
                    <entry>
                             <para></para>
                         </entry>
                         <entry>
                             <para></para>
                         </entry>
                         <entry>
                             <para></para>
                         </entry>
                     </row>


generates the following XHTML:

        <tr>
                     <td>
                         <p />
                     </td>
                     <td>
                         <p />
                     </td>
                     <td>
                         <p />
                     </td>
              </tr>

I am using XMLSpy. Any idea why it's writing <p/> instead of <p></p>
when the <para> element has no content? It works fine when it has content.
I understand that <p /> is valid XHTML but unfortunately IE doesn't seem
to render it correctly (the table row doesn't show). Is there a way to
force it to write <p></p> instead of just <p/>?

Thnaks,
--tassos


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


Current Thread

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.