File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Importing multiple external XSD files 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 "Importing multiple external XSD files" Watch "Importing multiple external XSD files" New topic

Importing multiple external XSD files

Ashish Agrawal
Ranch Hand

Joined: Nov 02, 2003
Posts: 112
I have defined XSD files for few XML files....all of them having <Transaction> as the root tag. There are multiple XSD files. Now I want to write a base XSD file...which will have root tag as <Request> with multiple <Transaction> node as its children . These children <Transaction> nodes' schema are defined in external XSDs and i want to import them.

The base XML will have <Request> as root tag with any number of <Transaction name="(name of transaction)"> child tags. The Transaction XSD file's name depend upon the "name" attribute of <Transaction> tag.

How can I import these external XSDs into the base XSD file?

Thanks and regards,
Ashish Agrawal.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
I assume you meant "include" and not import.
Technically speaking this can be done using the include construct of the schema element. That said, I would caution about Namespaces though, it can get really tricky and complicated.

- m

Take a Minute, Donate an Hour, Change a Life
It is sorta covered in the JavaRanch Style Guide.
subject: Importing multiple external XSD files
It's not a secret anymore!