[oXygen-user] Validation of Schema that Imports Multiple XSD Schemas

Oxygen XML Editor Support support at oxygenxml.com
Mon Aug 13 08:21:20 CDT 2012


Hello Robert,

When validating XML files, Oxygen provides a caching mechanism for the 
schema used for validation, so only the first validation will evaluate 
the entire schema hierarchy. The following XML validations will use the 
cached schema.

When validating XML schema files, the entire schema hierarchy starting 
from the current schema is validated every time. However, the validation 
time that you report seems extreme for an XML Schema validation, even if 
a large schema hierarchy is validated. Do you have a validation scenario 
with multiple validation units or are you using the default validation 
as it is offered by Oxygen?
Make sure the schemas are all local. In situations where schemas are 
imported from remote locations, make sure these remote URIs are resolved 
through an XML catalog to a local copy. My guess is some of the schemas 
from your schema hierarchy are requested from a remote location and 
that's what's causing the huge validation time.

To determine if some schemas are retrieved from remote locations, you 
can enable XML Catalog verbosity in Oxygen from Options > Preferences, 
XML > XML Catalog. Set "Verbosity" to "All messages". Whenever you 
validate or perform an Oxygen operation that involves the catalog 
resolver, the attempts to resolve URIs, systemIDs or namespaces 
(depending on your Oxygen catalog options) will appear in the Catalogs 
view from the results panel (at the bottom of the editor window).
Note that all attempts at resolving something are listed there, so it's 
possible you'll see a lot of redundant messages, first some that fail 
and eventually one that succeeds in resolving the URI.

We are not aware of any schema caching mechanisms that Saxon offers in 
this regard, but we have not investigated this possibility. But, my 
belief is that the problem you have encountered lies elsewhere. There 
seems to be a bottleneck somewhere that slows things down significantly 
and my first guess is that some of the schema files are not immediately 
accessible.

By any chance, have you tried to validate the same schema hierarchy with 
Saxon from the command line? Note that you'll need a separate Saxon 
deployment since the one bundled with Oxygen is only licensed to be used 
from within the application GUI.

Regards,
Adrian

Adrian Buza
oXygen XML Editor and Author Support

Tel: +1-650-352-1250 ext.202
Fax: +40-251-461482
support at oxygenxml.com
http://www.oxygenxml.com


Robert Leif wrote:
>
> Since my designs follow object-oriented design principles, my XSD 
> schemas import multiple XSD schemas, which provide and permit reuse of 
> many of their simpleTypes and complexTypes. The time for a successful 
> validation of a schema that solely imports 9 other schemas and does 
> not have any data-type or element definitions was in excess of 10 
> minutes. The subsequent validation took 3 minutes. 2.66  out of 4 
> gigabytes of memory and 50% of the CPU were used. I validated with 
> Saxon-EE 9.4.0.3 for XSD1.1.
>
> I suspect that the problem is that Saxon validated all of the imported 
> schemas. Since these schemas had NOT been changed after their previous 
> validation, this was a total waste of time! Does Saxon have a tool to 
> check the time of the previous validation against the time of the last 
> edit? If not, it needs one. There is a potential problem when two 
> schemas import each other. In this case, it probably pays to validate 
> both. A quick way to ameliorate this problem is to extend the 
> validation-well-formatted pull-down to include Validate only this 
> schema. Since a schema tree structure is needed to perform an 
> intelligent validation, it would be useful to make this tree available 
> to the user and to note if any of the imported schemas were not being 
> used.
>
> Has anyone else observed similar long validation times with another 
> validator?
>
> Thank you.
>
> Yours truly,
>
> Bob Leif
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>   



More information about the oXygen-user mailing list