On Sat, 11 Jun 2005, Antonio Gallardo wrote:
Hi:
Lets go back first to your first post, where you stated what you are
trying to archieve: "Insert a line or column break between items."
Correct.I simply cannot add <row> or <column> tabs to form1.xml to be
later interpreted as i desired as <tr>(for rows) and <td>(for columns) on
my xsl. This is also stated in http://wiki.apache.org/cocoon/GT2004Sylvain
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=111819623407003&w=2
I need first to be clar of what are you trying to archieve. A
<fd:selection-list> is used mainly to create what in GUIs we call a
combobox or a listbox. Do you want to put inside the combobox or listbox a
line between items?
Wrong. The selection-list i'm using has several items that will be
displayed as radio buttons. 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 include some code snippets bellow but if you prefer you can also see
them at pastebin: http://pisco.pastebin.com/299217
form1.xml(widget init)
<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(widget call)
<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(field styling)
<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>ColunmTest</xsl:text></td>
</xsl:for-each>
<xsl:if test="$line>1">
<tr><xsl:text>LineTest</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>
------------------------------------------------------
The problem whith these snippets is that i can not convert a number to a
node list on xsl, and to use a for-each cicle $line times and $columns
times i should use xstl 2.0 which allows (for-each select="1 to $line").
I'll be investigating if and how i can use xslt2.0 on cocoon, but it
anyone suggest web pointers that would great :)))
Thank you all for your pacience and time,
CarlosN.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]