|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








