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

RE: <br /> tag is condensed to <br> despite valiant ef

Subject: RE: <br /> tag is condensed to <br> despite valiant efforts to avoid this...
From: "Roger Campbell" <rogerc@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Mar 2001 17:20:48 -0700
br tag
The solution that we use to make valid xhtml that works in the major
browsers is to output <br class="none"/>.  Less than ideal, but it works.

Roger Campbell



-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Frank T.
O'Connor
Sent: Wednesday, March 07, 2001 9:13 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  <br /> tag is condensed to <br> despite valiant efforts
to avoid this...


Using MSXML3.

Here is my catch all for moving XHTML over from a xml node to the HTML
output during a transform:

<xsl:template match="*">
   <xsl:element name="{name()}">
     <xsl:copy-of  select="@*"/>
     <xsl:apply-templates select="node()"/>
  </xsl:element>
</xsl:template>

When this catches the br tag (all my br's are <br />) it moves it to the
HTML output as <br>. As that is not XHTML compatible it causes me havoc
later on.

I tried this:
<xsl:template match="*">
  <xsl:choose>
	<xsl:when test="name() = 'br'">
	  <![CDATA[<br />]]>
	</xsl:when>
	<xsl:otherwise>
	   <xsl:element name="{name()}">
	     <xsl:copy-of  select="@*"/>
	     <xsl:apply-templates select="node()"/>
	  </xsl:element>
	</xsl:otherwise>
  </xsl:choose>
</xsl:template>

But I only get "&lt;br /&gt;" in the output then.

Appreciate any help.

-Frank O'Connor

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



 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.