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

RE: [Saxon] <xsl:choose> inside <xsl:attribute-set>

Subject: RE: [Saxon] <xsl:choose> inside <xsl:attribute-set>
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 17 Aug 2000 17:34:26 +0100
xsl attribute xsl choose
Do you have xml:space="preserve" in your xml? If you do you will get this
error.

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of David Allouche
>Sent: 17 August 2000 19:22
>To: XSL mailing-list
>Subject: [Saxon] <xsl:choose> inside <xsl:attribute-set>
>
>
>
>First, I would like to thank Nikolai Grigoriev and Sebastian Rahtz for
>their very helpful answers to my question about using CSS to emulate FO.
>I am now woking at outputting CSS enriched HTML as Sebastian suggested.
>
>I have a problem wich looks very much like a bug in Saxon.
>I am using Saxon 5.4.1.
>
>- - - toto.xsl - - -
><?xml version="1.0" encoding="iso-8859-1"?>
><xsl:stylesheet version="1.0"
>		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>  <xsl:attribute-set name="foo">
>    <xsl:attribute name="bar">
>      <xsl:choose>
>	<xsl:when test="/toto">Toto</xsl:when>
>	<xsl:otherwise>Not Toto</xsl:otherwise>
>      </xsl:choose>
>    </xsl:attribute>
>  </xsl:attribute-set>
>
>  <xsl:template match="/">
>    <toto xsl:use-attribute-set="foo"/>
>  </xsl:template>
>
></xsl:stylesheet>
>- - - - - - - - - -
>
>$ java com.icl.saxon.StyleSheet toto.xml toto.xsl
>Failed to compile style sheet
>At xsl:choose on line 8 of file:/home/david/tmp/toto.xsl: Element must
>only be used within a template
>
>- - - XSLT Programmer's Reference (p. 164) - - -
>An attribute set in not simply a textual macro. The attributes contained
>in the attribute set each have a template body to define the value, and
>although this will often be a simple text node, it may also, for example,
>declare variables or invoke other XSLT instructions such as
><xsl:call-template> and <xsl:apply-templates>.
>- - - - - - - - - - - - - - - - - - - - - - - - -
>
>Is there actually a contradiction, or a I am misunderstanding something ?
>
>Actually, I can work around the problem by using named templates instead
>of attribute sets, but using attribute sets gives a useful clue to the
>human reader (I am working on an semi-automated conversion tool).
>
>Moreover this upsets me as a wrongness in my grokking of XSLT.
>
>                             -- David --
>
>PS: Kay's book is the One True Book (tm) on XSLT
>
>
>
> 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.