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

RE: Forbidden with several xsl:attribute from xsl:appl

Subject: RE: Forbidden with several xsl:attribute from xsl:apply-templates?
From: Americo Albuquerque <melinor@xxxxxxx>
Date: Tue, 1 Jul 2003 18:33:02 +0100
RE:  Forbidden with several xsl:attribute from xsl:appl
Hi

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Erik Beijnoff
> Sent: Tuesday, July 01, 2003 8:31 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Forbidden with several xsl:attribute from 
> xsl:apply-templates?
> 
> 
> > >I guess the problem is in the "..." that you haven't shown 
> us. It is
> > >probably writing elements or text nodes to the output. You 
> > can't write
> > >an attribute after writing a text node or element child to the same
> > >parent.
> 
> Nope. Just attribute output.
>  
> > Note that this includes a whitespace text node.
> 
> Thanks for the responses. Actually I tried to put all the 
> attributes on one single row, with the calling template also 
> on one single row, with no white-space at all betwen the 
> elements. No difference. It seems as if the very occurrence 
> of two <xsl:call-template> in a row scares the interpreter, 
> when the second <xsl:call-template> outputs attributes. My 
> guess is on a minor bug, but I may be wrong.

I don't think that your problem resides in the <xsl:apply-templates>, not
directly anyway.
You have <xsl:apply-templates select="." mode="..."/> in a template matching
a <p> element. So you'r changing mode in that element. You didn't show any
template matching <p> in your mode="elementselection", just a template
matching <h1>, so the default templates will be applyied and the text within
the <p> element will be put in the output. If that happens before your
<xsl:attribute> then you'll get your error message.
Check you templates in mode="elementselection" to see if any one of them are
displaying any text, including the default ones.

Hope this helps you



 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.