aspose file tools*
The moose likes XML and Related Technologies and the fly likes Unique particle attribution rule bit me - why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Unique particle attribution rule bit me - why?" Watch "Unique particle attribution rule bit me - why?" New topic
Author

Unique particle attribution rule bit me - why?

Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Hi,

I try to write some schemas for interaction of a Java web app with a mainframe application. While we write the schemas the document structure is more or less given by an interface we have to use. We use a given third party library that does all the dirty work for us (connecting to host etc.), what we have to do is to create XML documents representing requests to and responses from the mainframe.

We use XMLBeans for compiling schemas and generating Java sources. Right now I'm stuck with a compilation problem. My IDE (RAD 7) gives the following error:



A schema:


and one of the included schemas:



As you can see, MAPOSTKORBgetDataEkZeile is based on ZeileType. While ZeileType is rather simple, MAPOSTKORBgetDataEkZeile consists of several elements none of them mandatory. The basic idea behind ZeilenType (and element Zeile) is we use Zeile(nType) for every response, but each response's Zeile may consist of different elements thus it is defined by a different complexType. In this specific case, we want to use MAPOSTKORB's MAPOSTKORBgetDataEkZeile for two response's. Since its elements aren't mandatory this should work, but we get the error mentioned above.

So, what's the problem here? May be a basic, simple explanation of UPA rule is helpfull, I guess I just don't understand this constraint.
Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Duh, forget it, there's a duplicate line in the first schema ("Bezeichnung"). After removing the line compilation works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unique particle attribution rule bit me - why?
 
Similar Threads
XML schema validation
unble to validate xml against schema
MS Exchange web service: If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute
converting xsd to html
XML valiadation using schema