You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Nuno Santos <ns...@electroplus.pt> on 2002/10/15 13:54:52 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 a condition
check, which in my point of view is unneeded:
"if (value_ != null)"


I say that 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




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org