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

Re: .Net compiledTransform

Subject: Re: .Net compiledTransform
From: Ronan Klyne <ronan.klyne@xxxxxxxxxxx>
Date: Mon, 20 Nov 2006 13:12:14 +0000
Re:  .Net compiledTransform
Rick Roen wrote:
> I'm confused by the results I am getting from VB.Net 2005
> XslCompiledTransform.
> 
> I have the complete XSLT documents below, but it boils down to this:
> 
> Source doc:
> 
> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
> <Report>
> 	<ReportInfo>
> 		<CompanyName>Renee's Garden LLC</CompanyName>
> 		<ReportName>Cookbook sales report</ReportName>
> 		<OtherInfo>10/01/2006 to 10/31/2006</OtherInfo>
> 		<OtherInfo>Report date 11/20/2006 6:29:11 AM</OtherInfo>
> 	</ReportInfo>
> 	<Columns>
> 		<column align="left">Invoice no</column>
> 		<column align="left">Invoice date</column>
> 		<column align="left">Item no</column>
> 		<column align="left">Description</column>
> 		<column align="right">Total shipped</column>
> 		<column align="right">Order count</column>
> 		<column align="right">Cost</column>
> 	</Columns>
> ... other tags left out for brevity
> 
> Transformed by:
> 
> 	<xsl:template match="Columns" mode="colgroup">
> 		<colgroup>
> 			<xsl:for-each select="column">
> 				<col>
> 					<xsl:attribute name="align"
> select="@align"/>
> 				</col>
> 			</xsl:for-each>
> 		</colgroup>
> 	</xsl:template>
> 


XSL does not permit '<xsl:attribute name="align" select="@align"/>' -
the select attribute does not apply here. (See:
http://www.w3.org/TR/xslt#creating-attributes)
You probably want to use either
<xsl:attribute name="align">
  <xsl:value-of select="@align/>
</xsl:attribute name="align">

or the attribute value template:

<col align="{@align}"/>

HTH,

	# r

-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 (0)870 163 2555
ronan.klyne@xxxxxxxxxxx
www.groupbc.com

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.