You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nuno Santos <ns...@electroplus.pt> on 2002/10/15 13:52:13 UTC

XMLForm transformer

When i was developing a multi edit form, using the xf:repeat tag, i 
realised that it didn´t work before a simple tag call before, like 
"count(*)".

I then checked the source code and found the function that's responsible 
for the Repeat tag unrolling :
"protected void unrollRepeatTag( DocumentFragment docFragment )throws 
SAXException"

inside the function i found a block wich is responsible to get all the 
possible locations inside the «nodeset»:
" Collection locations = currentForm.locate( nodeset );"
" Iterator iter = locations.iterator();"
" while ( iter.hasNext() ){"
"   String nextNodeLocation = (String) iter.next ();"

after expanding the location to a group, there is also a condition 
check, which in point of view is unneeded:
"if (value_ != null)"


is say it because there is no previous "value_" setting if our top tag 
is "xf:repeat", wich means that we need to access a simple tag before 
using the "xf:repeat".

My sugestion is that eather remove the check (that i think is undeed) or 
replace it for a condition check on the group location object " 
Form.getvalue(nextNodeLocation)!=null"



                                            Best regards
                                                Nuno Santos



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XMLForm transformer

Posted by Ivelin Ivanov <iv...@apache.org>.
Nuno,

please submit the patch via Bugzilla.
I will gladly review and apply if appropriate.

Thank you.

Ivelin


----- Original Message -----
From: "Nuno Santos" <ns...@electroplus.pt>
To: <co...@xml.apache.org>
Sent: Tuesday, October 15, 2002 6:52 AM
Subject: XMLForm transformer


When i was developing a multi edit form, using the xf:repeat tag, i
realised that it didn´t work before a simple tag call before, like
"count(*)".

I then checked the source code and found the function that's responsible
for the Repeat tag unrolling :
"protected void unrollRepeatTag( DocumentFragment docFragment )throws
SAXException"

inside the function i found a block wich is responsible to get all the
possible locations inside the «nodeset»:
" Collection locations = currentForm.locate( nodeset );"
" Iterator iter = locations.iterator();"
" while ( iter.hasNext() ){"
"   String nextNodeLocation = (String) iter.next ();"

after expanding the location to a group, there is also a condition
check, which in point of view is unneeded:
"if (value_ != null)"


is say it because there is no previous "value_" setting if our top tag
is "xf:repeat", wich means that we need to access a simple tag before
using the "xf:repeat".

My sugestion is that eather remove the check (that i think is undeed) or
replace it for a condition check on the group location object "
Form.getvalue(nextNodeLocation)!=null"



                                            Best regards
                                                Nuno Santos



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>