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

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

Subject: RE: Forbidden with several xsl:attribute from xsl:apply-templates? - test and results
From: "Erik Beijnoff" <erik@xxxxxxxxxxxx>
Date: Wed, 2 Jul 2003 00:22:10 +0200
xsl attribute name font family
> Did you tell us what processor you're using?
> 

Xalan 2.4.1 with FOP

> Many of us XSLT programmer-types have two (or three or four) 
> different 
> processors on our system to try when this kind of thing 
> happens. If the 
> stylesheet breaks in another processor, chances are the bug 
> is your own.
> 

Below is a more complete sample. 

This gives a correct output, all attributes included, when tested in XML
Spy version 4.1, which I think uses MSXML(?) by default.

So either the error is in my code or in Xalan. But I've learned by time
that you shouldn't be too quick too blame other peoples code. Although I
have been testing it extensively to try to find the troublesome spot.
But I won't go into details about that here.

The specific thing that I'm doing is that the "mode" templates are
output through a home cooked transformation of CSS files into a separate
"styling" xslt file that then includes the main stylesheet. To achieve
integration with the css style profile of a web site.

But to conclude this: The code below seems to be valid xslt, so the
error is elsewhere. Thanks for the input.

----------------------------------------------------------------
<!--Test XSLT - NOT a complete xsl:fo output, I know-->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
	
 <xsl:template match="p">
    <fo:block>
      <xsl:apply-templates select="." mode="elementselection"/>
      <xsl:apply-templates select="." mode="classselection"/>
      <xsl:apply-templates/>
    </fo:block>
 </xsl:template>	
	
	
 <xsl:template match="p" mode="elementselection">	
    <xsl:attribute name="font-family">sans-serif</xsl:attribute>
    <xsl:attribute name="font-size">20pt</xsl:attribute>
 </xsl:template>
 
 <xsl:template match="*[@class = 'leadtext']" mode="classselection">
    <xsl:attribute name="border-bottom-color">sans-serif</xsl:attribute>
    <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
 </xsl:template>

</xsl:stylesheet>


<!--Test XML -->
<?xml version="1.0" encoding="UTF-8"?>
<body>
Test
	<!-- This is the specific node -->
	<p class="leadtext">Test2</p>
</body>



 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.