Actually, even with maxOccurs='unbounded', if the type is xsd:string it works if
you expect an empty string.
public void testCollectionOverrideProperty() throws Exception
| {
| SchemaBinding schema = XsdBinder.bind(new StringReader(XSD), null);
|
| schema.setIgnoreUnresolvedFieldOrClass(false);
|
| ClassMetaData classMetaData = new ClassMetaData();
| classMetaData.setImpl(Top.class.getName());
| ElementBinding element = schema.getElement(new QName(NS, "top"));
| assertNotNull(element);
| element.setClassMetaData(classMetaData);
|
| Top top = (Top) unmarshal("IgnorableWhitespaceContent.xml", schema,
Top.class);
| assertNotNull(top.string);
| assertEquals(1, top.string.size());
| assertEquals("", top.string.get(0));
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052483#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...