support for specifying appearance for select and select1 from the schema.

handling the case where create web content is called with no forms configured for the web project

some more progress on xf:switch

updated tests - including one from ken at berkeley who is trying to use forms to write grant applications.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4925 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-01-25 00:39:30 +00:00
parent bd25cfa86f
commit 1c966e9a71
10 changed files with 1227 additions and 614 deletions

View File

@@ -34,6 +34,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
@@ -175,4 +176,41 @@ public class XMLUtil
return null;
}
}
/**
* Provides a NodeList of multiple nodelists
*/
public static NodeList combine(final NodeList... nls)
{
return new NodeList()
{
public Node item(final int index)
{
int offset = 0;
for (int i = 0; i < nls.length; i++)
{
if (index - offset < nls[i].getLength())
{
return nls[i].item(index - offset);
}
else
{
offset += nls[i].getLength();
}
}
return null;
}
public int getLength()
{
int result = 0;
for (int i = 0; i < nls.length; i++)
{
result += nls[i].getLength();
}
return result;
}
};
}
}