Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 70221 invoked from network); 19 Jan 2005 15:36:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Jan 2005 15:36:57 -0000 Received: (qmail 71092 invoked by uid 500); 19 Jan 2005 15:36:34 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 71051 invoked by uid 500); 19 Jan 2005 15:36:34 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 71012 invoked by uid 99); 19 Jan 2005 15:36:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.auto-trol.com (HELO is3.auto-trol.com) (143.198.15.20) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 19 Jan 2005 07:36:31 -0800 Received: from endeavor.houdev.auto-trol.com ([143.198.5.23]) by is3.auto-trol.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id DH9QSM5R; Wed, 19 Jan 2005 08:36:24 -0700 Received: by endeavor.houdev.auto-trol.com with Internet Mail Service (5.5.2653.19) id ; Wed, 19 Jan 2005 09:41:21 -0600 Message-ID: <510A660320ABD61183BB00A0247D7C87010A94BA@endeavor.houdev.auto-trol.com> From: Jason Wood To: Jakarta Commons Users List Subject: [betwixt] couple of questions Date: Wed, 19 Jan 2005 09:41:20 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 1) is there a document describing the different attributes each element in a configuration file an contain? 2) has to do with List. When using a configuration if the element is not present then all properties must be explicitly listed. For a List property to show up in the XML output, it as all the rest must be explicitly listed ... . This is fine, but "MyAttribute" will show up for every entry in the java.util.List... example ... public class OutterClass { private Vector attributes = new Vector(); public OutterClass() { attributes.add(new DerivedClassA()); attributes.add(new DerivedClassB()); } public void addAttribute(BaseClass attr) { attributes.add(attr); } public Vector getAttributes() { return attributes; } } public class DerivedClassA implements BaseClass { } public class DerivedClassB implements BaseClass { } ----------------------------------------------------------------- I tried to remove the name="MyAttribtue" because I want betwixt to use each entries (DerivedClassA and DerivedClassA) .betwixt file. for instance but the digester states the "name" attribtue is required... [ERROR] Digester - Begin event threw exception org.xml.sax.SAXException: Name attribute is required. at org.apache.commons.betwixt.digester.ElementRule.begin(ElementRule.java:75) at org.apache.commons.digester.Digester.startElement(Digester.java:1286) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno wn Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1629) at org.apache.commons.betwixt.XMLIntrospector.findByXMLDescriptor(XMLIntrospect or.java:949) at org.apache.commons.betwixt.XMLIntrospector.introspect(XMLIntrospector.java:4 65) at org.apache.commons.betwixt.XMLIntrospector.introspect(XMLIntrospector.java:4 12) at org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(AbstractBeanWrite r.java:223) at org.apache.commons.betwixt.io.AbstractBeanWriter.write(AbstractBeanWriter.ja va:155) at org.apache.commons.betwixt.io.BeanWriter.write(BeanWriter.java:190) at com.betwixt.Main.main(Main.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) I thought I could use the PluralStemmer in this case, but there is not enough information being passed to findPluralDescriptor( String propertyName, Map map ) in order for the code to choose the right ElementDescriptor. Is it possible that if the name attribute is not present to tell betwixt to use the given name in the classes .betwixt file for output? If it is possible and not already in the current CVS src ... can I checkout the source and add it. Thanks J --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org