I believe Ben is unavailable this week (he indicated he would not be in tomorrows meeting).
I am comfortable with the approach Andrea described (importing when no element / type definition are provided - as a nice minimal change), if you like you could make a setting or system property to change to the import all the time functionality and experiment with the performance consequence. -- Jody Garnett On 24 August 2015 at 03:42, Andrea Aime <[email protected]> wrote: > Hi Stefano, > those are good observations. Let's hear what Ben has to say? :-) > > Cheers > Andrea > > On Mon, Aug 24, 2015 at 12:17 PM, Stefano Costa < > [email protected]> wrote: > >> >> >> On Mon, Aug 24, 2015 at 10:46 AM, Andrea Aime < >> [email protected]> wrote: >> >>> On Mon, Aug 24, 2015 at 9:45 AM, Stefano Costa < >>> [email protected]> wrote: >>> >>>> The fix affects org.geotools.xml.Schemas and essentially forces the >>>> import of external schemas (if any) when the schema being parsed contains >>>> itself no element / type definition. >>>> >>> >>> I'm wondering if it would not be more correct to always import the other >>> schemas. After all, one could >>> use a mix of local and importer elements, no? >>> >>> Just as a guess, doing the import always has maybe serious performance >>> /memory usage implications? >>> >> >> I considered this (simpler) option, but I was a bit worried about the >> implications. >> >> If there are local elements / types which refer to externally defined >> elements / types (e.g. GeologicUnitPart, defined in geologicUnit.xsd, >> extends gml:AbstractObject, which is defined in some GML schema, don't >> remember which one), then the parser already imports the external schemas >> automatically: if I remove the check on the importing schema's content and >> always force the import, I'll be doing the same job twice, possibly ending >> up with multiple copies of the same element / type definitions (maybe this >> is not true, didn't test it). >> >> Importing and parsing remote schemas can be a time consuming task: I have >> a unit test which loads all GeoSciML 3.2 schemas plus their dependencies >> (GML 3.2, GMD, ecc...) and it takes more than 1 minute to run, so I would >> strive to avoid importing the same schemas twice. >> >> It is true that app-schema caches remote schemas locally, so the second >> import would be much faster, but the fix I wrote is in the gt-xsd-core >> module, which is likely used in other contexts, where caching may not be >> available. >> >> Perhaps I should apply the fix to the app-schema extension only? >> >> >> -- >> >> Best regards, >> Stefano Costa >> >> == >> GeoServer Professional Services from the experts! Visithttp://goo.gl/it488V >> for more information. >> == >> Dott. Stefano Costa >> Senior Software Engineer >> >> GeoSolutions S.A.S. >> Via Poggio alle Viti 1187 >> 55054 Massarosa (LU) >> Italy >> phone: +39 0584 962313 >> fax: +39 0584 1660272 >> http://www.geo-solutions.ithttp://twitter.com/geosolutions_it >> >> ------------------------------------------------------- >> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 >> Le informazioni contenute in questo messaggio di posta elettronica e/o >> nel/i file/s allegato/i sono da considerarsi strettamente riservate. >> Il loro utilizzo è consentito esclusivamente al destinatario del >> messaggio, per le finalità indicate nel messaggio stesso. Qualora >> riceviate questo messaggio senza esserne il destinatario, Vi preghiamo >> cortesemente di darcene notizia via e-mail e di procedere alla >> distruzione del messaggio stesso, cancellandolo dal Vostro sistema. >> Conservare il messaggio stesso, divulgarlo anche in parte, >> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità >> diverse, costituisce comportamento contrario ai principi dettati dal >> D.Lgs. 196/2003. >> >> The information in this message and/or attachments, is intended solely >> for the attention and use of the named addressee(s) and may be >> confidential or proprietary in nature or covered by the provisions of >> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New >> Data Protection Code).Any use not in accord with its purpose, any >> disclosure, reproduction, copying, distribution, or either >> dissemination, either whole or partial, is strictly forbidden except >> previous formal approval of the named addressee(s). If you are not the >> intended recipient, please contact immediately the sender by >> telephone, fax or e-mail and delete the information in this message >> that has been received in error. The sender does not give any warranty >> or accept liability as the content, accuracy or completeness of sent >> messages and accepts no responsibility for changes made after they >> were sent or for other risks which arise as a result of e-mail >> transmission, viruses, etc. >> >> > > > -- > == > GeoServer Professional Services from the experts! Visit > http://goo.gl/it488V for more information. > == > > Ing. Andrea Aime > @geowolf > Technical Lead > > GeoSolutions S.A.S. > Via Poggio alle Viti 1187 > 55054 Massarosa (LU) > Italy > phone: +39 0584 962313 > fax: +39 0584 1660272 > mob: +39 339 8844549 > > http://www.geo-solutions.it > http://twitter.com/geosolutions_it > > *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003* > > Le informazioni contenute in questo messaggio di posta elettronica e/o > nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il > loro utilizzo è consentito esclusivamente al destinatario del messaggio, > per le finalità indicate nel messaggio stesso. Qualora riceviate questo > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di > darcene notizia via e-mail e di procedere alla distruzione del messaggio > stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, > divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od > utilizzarlo per finalità diverse, costituisce comportamento contrario ai > principi dettati dal D.Lgs. 196/2003. > > > > The information in this message and/or attachments, is intended solely for > the attention and use of the named addressee(s) and may be confidential or > proprietary in nature or covered by the provisions of privacy act > (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection > Code).Any use not in accord with its purpose, any disclosure, reproduction, > copying, distribution, or either dissemination, either whole or partial, is > strictly forbidden except previous formal approval of the named > addressee(s). If you are not the intended recipient, please contact > immediately the sender by telephone, fax or e-mail and delete the > information in this message that has been received in error. The sender > does not give any warranty or accept liability as the content, accuracy or > completeness of sent messages and accepts no responsibility for changes > made after they were sent or for other risks which arise as a result of > e-mail transmission, viruses, etc. > > ------------------------------------------------------- > > > ------------------------------------------------------------------------------ > > _______________________________________________ > GeoTools-Devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > >
------------------------------------------------------------------------------
_______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
