Christopher Hunt
Fri, 06 Jun 2008 05:12:20 -0700
Hi there,I'm not sure if this is an xmlbeans issue, or an issue with the xml validator I'm using...
I've produced an XML (GML) document which I validate with Java 1.5's SchemaFactory for a junit test case. The test case fails and declares:
The value of {abstract} in the element declaration for 'ns1:AbstractTimeSlice' must be false.
Here's the xml: <AbstractTimeSlice xsi:type="ns:JourneyStatusType" ns1:id="a1">(I can't use substitution groups because the JourneyStatusType is in a different jar to the AbstractTimeSlice...)
Here's the code I use to construct the timeslice: AbstractTimeSliceType abstractTimeSliceType = historyPropertyType .addNewAbstractTimeSlice(); JourneyStatusType journeyStatusType = (JourneyStatusType) abstractTimeSliceType .changeType(JourneyStatusType.type); Thanks for any help. Cheers, -C