Skip to main content

Enhancing XJC listener - part 2

1 reply [Last post]
Joined: 2004-11-17

When XJC is run on the main schema, how do i get a list of all schemas that were referenced (include, import, redefine)? I can create a simple visitor based on xsom XSSchemaSet, but this seems an overkill - I need only a list of schemas.

Is it possible to get an additional function in XJCListener?

In addition - how about adding an XJCHandler with empty implementation of XJCListener. Much like DefaultHandler for SAX, this will allow creating listeners only for specific information.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-09

I can easily give you XSSchemaSet. Listing up all the schema documents is harder. I'm also curious what you'd use the list of file names for. If you are going to parse it with XSOM, don't you want to just get XSSchemaSet?

I also changed XJCListener from an interface to a class to allow this to evolve in the future without breaking the compatibility. All the methods come with default empty implementation.