If we have a built view without a name or a group without a name, when we call myView.toSAX(handler, context), we get an NPE (quietly the same for view without name):
java.lang.NullPointerException: Cannot invoke "String.length()" because "string" is null at org.apache.xml.serializer.ToStream#writeAttrString:2167 at org.apache.xml.serializer.ToStream#processAttributes:2146 at org.apache.xml.serializer.ToStream#closeStartTag:2692 at org.apache.xml.serializer.ToStream#startElement:1994 at org.apache.xalan.transformer.TransformerIdentityImpl#startElement:1120 at org.apache.cocoon.xml.AbstractXMLPipe#startElement:95 at org.apache.cocoon.xml.XMLUtils#startElement:664 at org.ametys.runtime.i18n.I18nizable#toSAX:42 at org.ametys.core.util.XMLUtils#createI18nElementIfNotNull:80 at org.ametys.runtime.model.SimpleViewItemGroup#toSAX:89 at org.ametys.runtime.model.SimpleViewItemGroup#toSAX:94 at org.ametys.runtime.model.View#toSAX:377 [...]