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

RE: Handling Mixed Child Elements and Text() Nodes

Subject: RE: Handling Mixed Child Elements and Text() Nodes
From: Americo Albuquerque <melinor@xxxxxxxx>
Date: Thu, 2 Oct 2003 12:03:11 +0100
div child elements
Hi

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Brook Ellingwood
> Sent: Thursday, October 02, 2003 5:47 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Handling Mixed Child Elements and Text() Nodes
> 
> 
> One further observation on the processor differences in this 
> operation (without reposting all the code). You are getting
> 
> <div class="body_subhead">Linked Text</div>
> 
> from Saxon, but I'm getting
> 
> <div class="body">Linked Text</div>
> 
> from MSXML3. Easy enough to find a workaround, but I thought 
> I'd point it out. If MSXML3 behaved the way I expected it to, 
> I probably would have gotten this worked out on my own two days ago.
> 
> Thanks again.

That's true. I've tested the code with msxml3, saxon and xalan and only
saxon displayed
<div class="body_subhead">Linked Text</div>

But differences doesn't stop here, in saxon and msxml I get
<div class="body"><a href="a" class="body">A</a></div>
But with xalan I get
<div class="body">
<a href="a" class="body">A</a>
</div>

Regarding to the body_subhead case, on the template named d1 change the
<xsl:otherwise> like this:
Before:
      <xsl:otherwise>
        <div class="{$divClass}">
          <xsl:value-of select="$s"/>
After:
      <xsl:otherwise>
        <div class="{$divClass}">
          <xsl:if test="$s"><xsl:value-of select="$s"/></xsl:if>

This will make msxml and xalan to display 
<div class="body_subhead">Linked Text</div>

Regards,
Americo Albuquerque




 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.