Modelling Java Classes in XSD

Hi, I have used Electric XML + to create a set of schemas from a java class.
This works fine, but Electric XML+ stops when it hits standard Java classes
(obviously it might be stupid as it would create thousands of complex XSD's
as it moves up the class hierarchy).

The question is, what would be an acceptable way to mark the point where you
want to stop modelling your object? i.e. I have the following schema:

<schema xmlns='http://www.w3.org/2001/XMLSchema'

targetNamespace='http://www.themindelectric.com/package/uk.co.enterpriseis.c
ollections.base.persistent/'
	xmlns:electric='http://www.themindelectric.com/schema/'>
    <complexType name='Collection' abstract='true'>
      <sequence>
        <element name='fieldCollection' nillable='true'
electric:field='fieldCollection'
xmlns:ns3='http://www.themindelectric.com/package/java.util/'
type='ns3:Collection'/>
      </sequence>
    </complexType>
  </sche
which marks "fieldCollection" as type "ns3:Collection" (effectively marking
it as a java.util.Collection).  The problem is that if you run this through
a schema validator (such as the one I use, the IBM Schema Quality Checker)
it will complain as follows:
	"Type http://www.themindelectric.com/package/java.util/:Collection is not
found.
	There is no import statement associated with the namespace
'http://www.themindel
	ectric.com/package/java.util/'."
and quite rightly too as the type is not found.  As I mentioned before, I
want to mark this in some acceptable way as being a java.util.Collection
without defining java.util.Collection in an XSD.

I would appreciate any thoughts on this.

Andrew Sealy-Bell.

Received on Wednesday, 3 April 2002 03:50:03 UTC