But I’m getting the error even when I create a new SchemaFactoryImpl for every file.

Do all SchemaFactoryImpl instances use the same SchemaAwareConfiguration object?

 

I was expecting that if I create a new SchemaFactoryImpl it won’t reuse schemas from another SchemaFactoryImpl.

 

How can I use a new SchemaFactoryImpl without any cached schema files from other ones?

 

Regards,

Leo Antoli

 


From: Michael Kay [mailto:mike@saxonica.com]
Sent: 17 January 2007 12:27
To: Antoli, Leo; saxon-help@lists.sourceforge.net
Subject: RE: Length facet illegal in restriction of list type

 

Yes, this almost certainly has something to do with schema caching. Typically, if you try to add a schema document to the cache when the cache already contains schema components for the same namespace, the new document doesn't get added (the rules are a bit more complex than that, though). I'm afraid this is an area where the specs are fairly messy, and in consequence the implementation is fairly messy too. This means you might be fixing up to a different base type with the same name.

 

Generally, if there's any possibility of two schemas containing different definitions of the same type, then it's a good idea to make sure they aren't loaded into the same cache. The cache here is actually the Configuration object, but you'll have a new Configuration for every JAXP SchemaFactoryImpl.

 

Michael Kay

http://www.saxonica.com/

 


From: Antoli, Leo [mailto:Leo.Antoli@Misys.com]
Sent: 17 January 2007 12:00
To: Michael Kay; saxon-help@lists.sourceforge.net
Subject: RE: Length facet illegal in restriction of list type

I’ve done further research and I think the problem is not in the schema files themselves.

 

I don’t get any error when I do this:

 

For each file…

      SchemaFactoryImpl factory = new SchemaFactoryImpl();

      factory.newSchema(file);

 

 

But I get the error when I do this:

 

SchemaFactoryImpl factory = new SchemaFactoryImpl();

For each file…

factory = new SchemaFactoryImpl();

      factory.newSchema(file);

 

Could it be that something is cached and only flushed in finalize method?

 

Regards,

Leo Antoli



This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person.   

 

Misys Banking Systems is a trading name of Misys International Banking Systems Limited which is registered in England and Wales under company registration number 00971479 and with its registered office address at Burleigh House, Chapel Oak, Salford Priors, Evesham WR11 8SP.

 

THIS E-MAIL DOES NOT CONSTITUTE THE COMMENCEMENT OF LEGAL RELATIONS BETWEEN YOU AND MISYS INTERNATIONAL BANKING SYSTEMS LIMITED. PLEASE REFER TO THE EXECUTED CONTRACT BETWEEN YOU AND THE RELEVANT MEMBER OF THE MISYS GROUP FOR THE IDENTITY OF THE CONTRACTING PARTY WITH WHICH YOU ARE DEALING.