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

Re: matching <br/> v. <br></br>

Subject: Re: matching <br/> v. <br></br>
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Wed, 31 Jan 2001 13:27:39 -0800
xsl matching br
Sorry That was not clear enough and perhaps misleading.  Here is a
reproducible set of XSL and XML.

Note that when the para's are enclosed in a span with a font class this
behavior happens.  But when the span is removed the output of the <br></br>
is passed through to be seen by a user:

XML (run in coocon or command line with Xalan)
=======================================
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<?cocoon-process type="xslt"?>

<test>
  <para>kjdsf sdlfkjf lsls dflflk sg <br/> jdflk dfkldf lsl dfklgj skl
</para>
  <para>kjdsf sdlfkjf lsls dflflk sg <br></br> jdflk dfkldf lsl dfklgj skl
</para>
  <para>Holly and Jeff<br/> received some<br></br> training
manuals&lt;br&gt;&lt;/br&gt; they ordered.</para>
</test>
--------------------------------------------------------------
XSL
=========================================
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
 version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="test">
  <html>
    <head>
    <style>
    .test {}
    </style>
      <title></title>
    </head>
    <body>
      <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="para">
  <xsl:for-each select=".">
   <span class="test">
    <xsl:apply-templates/>
   </span>
    <hr/>
  </xsl:for-each>
</xsl:template>

<xsl:template match="br | BR">
  <br/>
</xsl:template>

</xsl:stylesheet>

----- Original Message -----
From: "Robert Koberg" <rob@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, January 31, 2001 12:21 PM
Subject:  matching <br/> v. <br></br>


> (using Xalan)
>
> I have a basic template like so:
>
> <xsl:template match="br | BR">
>    <br/>
> </xsl:template>
>
> If the XML contains just a <br/> tag it styles correctly with a single
<br>.
> If the XMl contains <br></br> then it produces two <br><br>.
>
> Is this a bug or expected behavior?  Is there a way around it?
>
>
>  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.