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

problems with xsl

Subject: problems with xsl
From: "Feng, Min" <FengM@xxxxxxxxxxxxxxxx>
Date: Fri, 15 Jan 1999 11:59:29 -0500
problems with xsl
I am new to XSL/XML. I came across 2 problems when trying to write XSL
for converting XML
cocuments to HTML. The xsl processor I used is Koala Xsl engine.

 First, I want to generate a comma separated list similar to 
	a1, a2, a3

   From  the following xml:
	<col name="a1"/>
	<col name="a2"/>
	<col name="a3'/>

   I used the following rules, but the Koala processor reported an
error, complaining both rules are
   the same. 

	<xls:template match='col[last-of-type()]'>
		<xsl:value-of expr="attribute(name)"/>
		<xsl:text>,</xsl:text>
	</xsl:template>

	<xsl:template match='col'>
		<xsl:value-of expr="attribute(name)"/>
	</xsl:template>

  What I did wrong here? If so, how do you generate the list?

  The second problem I have is:
	From XML:
		<table name="TAB1">
		    <columns>
			<col name=......../>
			<col name=...../>
		    </columns>
		    <indexs>
			....
		   </indexs>
		</table>
 
	Desired output is:
		Create table TAB1 (....);

		create index .... on TAB1 ...

	That is I want to take a parent node's attribute down to a child
node level. How can I
	do this? what XSL rule should look like?

	Thanks for any lead.

		


 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.