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

RE: Can not convert number to a NodeList

Subject: RE: Can not convert number to a NodeList
From: "Carlos M. S. Bento Nogueira" <cmsbn@xxxxxxxxxxxxxxxxx>
Date: Sun, 12 Jun 2005 03:00:36 +0100 (WEST)
xslt convert to number
I believed Michael Kay pointed the solution i'll use(switch to xslt 2.0).
I will be testing if and how i can use xslt 2.0 with apache cocoon 2.1.7.

What i basically wanted was to insert as many <tr> tags as lines and as many <td> tags as columns
between the list elements. I cannot do it neither on form1.xml nor on form1_template_action.xml(here the elements on form1 are called).
The line and column parameters are being passed from form1_template_action.xml
to forms-field-styling.xsl.


Note that i also cannot insert <line> or <row> tabs between elements on form1.xml.


form1.xml
<fd:widget>
(..)
<fd:field id="sexo_opcoes">
<fd:selection-list>
<fd:item value="Masc."/>
<fd:item value="Fem."/>
<fd:item value="Other."/>
-----------------------------------------------------
form1_template_action.xml
<fi:group>
<fi:styling type="tabs"/>
<fi:items>
<fi:group> (each group represents one tab)
(...)
<table border="0">
<tr>
<td>
<ft:widget id="sexo_opcoes">
<fi:styling list-type="radio" list-orientation="horizontal" line="1" column="3">
(...)
---------------------------------------------------
forms-field-styling.xsl


<xsl:stylesheet version="1.0"....>
<xsl:template match="fi:field[fi:selection-list][fi:styling/@list-type='radio']" priority="2">
<xsl:variable name="column" select="number(fi:styling/@column)"/>
<xsl:variable name="line" select="number(fi:styling/@line)"/>
(...)


 <xsl:for-each select="$line">
        <xsl:for-each select="$column">
                <td><xsl:text>C</xsl:text></td>
        </xsl:for-each>

        <xsl:if test="$line&gt;1">
                <tr><xsl:text>L</xsl:text></tr>
        </xsl:if>
 </xsl:for-each>
----------------------------------------------------------
Desired HTML output example:
(...)
<table border="0">
<tr>
<td>
	label: sexo
</td>
<td>
	Masc.
</td>
<td>
	Fem.
</td>
<td>
	Other
</td>

Thanks for your support and time,
CarlosN.


On Sat, 11 Jun 2005, Aron Bock wrote:


Carlos, you may want to include the relevant snippet of your input XML, desired output, and your calling environment since you say " this variables are numbers that must be passed to my xsl file."

Regards,

--A

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



--


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.