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

Re: : RE: suppressing default template rules

Subject: Re: : RE: suppressing default template rules
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Fri, 29 Mar 2002 13:21:12 +0100
Re: : RE:  suppressing default template rules
> <?xml version="1.0" ?>
> <custdet>custdettag
>     <employee>emptag</employee>
>     <firstname>first</firstname>
>     <lastname>last</lastname>
> </custdet>

> The expected output (as per the following node
> structure)_
>
> / (root node)
>  +- custdet
>  |   +- 'custdettag'
>     +- employee
>     |   +- 'emptag'
>     +- firstname
>     |   +- 'first'
>     +- lastname
>         +- 'last'

This is correct when using <xsl:strip-space elements="*"/>. And from the
name 'strip-space' you can already see where it comes from: from the
whitespaces. They are between the end of one node and the beginning of the
next node. The complete tree of custdet:

+-- custdet
|  +--  'custdettag        '   (including one linebreak)
   +--  employee
   +--  '             '     (whitespaces + linebreak)
   +--  firstname
   +--  '             '
   +--  lastname

If you write the whle XML in 1 line without whitespaces, you will see the
expected output too. You also can change the <xsl:apply-templates/> in the
template matching on * change to <xsl:apply-templates
select="*|text()[normalize-space()]"/>. Or change the template matching on
text() to <xsl:template match="text()[normalize-space()]"/>.

Regards,

Joerg


 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.