[auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents [SEC=UNCLASSIFIED]

Ben Caradoc-Davies Ben.Caradoc-Davies at csiro.au
Tue May 17 01:59:51 EDT 2011


The schemaLocation for these instances is wrong. It should be 
http://www.geosciml.org/geosciml/2.1/xsd/geosciml.xsd
as per OGC policy.

http://www.geosciml.org/geosciml/2.1.1/xsd/geosciml.xsd
results in 404 Not found.

On 17/05/11 12:30, Bruce.Simons at dpi.vic.gov.au wrote:
>> PS.  Bruce, are you able, in XMLSpy, to validate GeoSciML v2 instance documents that use the parent version2 geosciml.xsd schema
> This raises some interesting results:
> Instances at
> https://www.seegrid.csiro.au/subversion\GeoSciML\branches\2.0.x\instances<https://www.seegrid.csiro.au/subversion/GeoSciML/branches/2.0.x/instances>  validate.
>
> However, instances at
> https://www.seegrid.csiro.au/subversion/GeoSciML/branches/2.1.1/examples/ do not, producing the error:
> File U:\CSIROSubversion2\GeoSciML\branches\2.1.1\examples\Exemplar_GeoSciML211_GeologicUnit.xml could not be validated because of an error in XML Schema/DTD (see below)
>          Unable to load a schema with target namespace 'urn:cgi:xmlns:CGI:GeoSciML:2.1.1' from 'http://www.geosciml.org/geosciml/2.1.1/xsd/geosciml.xsd'.
>                  Error location: wfs:FeatureCollection
>                  Details
>                          schema_reference: Unable to load a schema with target namespace 'urn:cgi:xmlns:CGI:GeoSciML:2.1.1' from 'http://www.geosciml.org/geosciml/2.1.1/xsd/geosciml.xsd'.
>
>
> ----------------------------------------------------
> Bruce Simons
> Senior Information Geoscientist
> IUGS-Commission for Geoscience Information Oceania Councillor
> GeoScience Victoria/Australian Spatial Research Data Commons
> Level 9, 55 Collins St
> PO Box 4440
> Melbourne, Victoria, 3001
> Australia
>
> Ph: +61-3-9658 4502
> Fax: +61-3-9658 4555
> Mobile: +61 429 177155
>
>
>
> From:<Oliver.Raymond at ga.gov.au>
> To:<auscope-geosciml at lists.arcs.org.au>
> Date:        17/05/2011 02:06 PM
> Subject:        [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents [SEC=UNCLASSIFIED]
> Sent by:        auscope-geosciml-bounces at lists.arcs.org.au
> ________________________________
>
>
>
> oops, small  typo corrected....
>
>
> ________________________________
>
> From: auscope-geosciml-bounces at lists.arcs.org.au [mailto:auscope-geosciml-bounces at lists.arcs.org.au] On Behalf Of Raymond Oliver
> Sent: Tuesday, 17 May 2011 2:01 PM
> To: auscope-geosciml at lists.arcs.org.au
> Subject: [QUAR] Re: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents ISSUE=33916 PROJ=9 [SEC=UNCLASSIFIED]
> Importance: Low
>
> OK, the “already declared” problem is a different problem that I think will disappear with pointing our new schemas to schemas.opengis.net.
>
> At least the namespace problem has gone away when using a root schema other than geosciml.xsd.  It appears that the v3rc2 schemas instance docs will not validate in XMLSpy if we use the geosciml.xsd schema as the root schema.  eg: we should use geosciml-core.xsd or geologicUnit.xsd for GeologicUnits; use laboratoryAnalsysis-Specimen.xsd or laboratoryAnalysis.xsd for AnalyticalInstruments, etc.
>
> I don’t think XMLSpy would ever validate an instance document which uses the parent geosciml.xsd as the root schema.  The features that we are delivering all have the namespaces of their individual packages (eg, “GeoSciML-Core”, “Borehole”, etc), so the namespace of the root geosciml.xsd schema (ie, “GeoSciML”) will never match the namespace of the serialised feature in an instance document.
>
> Does anybody have any idea of how to change geosciml.xsd such that it could be used as a root schema for a XMLSpy-validatable GeoSciML WFS?
>
> Cheers,
> Ollie
>
> PS.  Bruce, are you able, in XMLSpy, to validate GeoSciML v2 instance documents that use the parent version2 geosciml.xsd schema?
>
>
> ________________________________
>
> From: Bruce.Simons at dpi.vic.gov.au [mailto:Bruce.Simons at dpi.vic.gov.au]
> Sent: Tuesday, 17 May 2011 12:27 PM
> To: Raymond Oliver
> Subject: RE: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents ISSUE=33916 PROJ=9 [SEC=UNCLASSIFIED]
>
> TestLabAnalysisDocNo2ForBruce.xml and TestLabAnalysisDocNo3ForBruce.xml both give the following error:
>
> 'om:OM_Observation' is already declared in schema document 'https://www.seegrid.csiro.au/subversion/GeoSciML/ISO19156_xsd/schemas/OM/om/2.0/observation.xsd'.
>         Error location: schema / element
>         Details
>                 sch-props-correct.2: 'om:OM_Observation' is already declared in schema document 'https://www.seegrid.csiro.au/subversion/GeoSciML/ISO19156_xsd/schemas/OM/om/2.0/observation.xsd'.
>
>
> ----------------------------------------------------
> Bruce Simons
> Senior Information Geoscientist
> IUGS-Commission for Geoscience Information Oceania Councillor
> GeoScience Victoria/Australian Spatial Research Data Commons
> Level 9, 55 Collins St
> PO Box 4440
> Melbourne, Victoria, 3001
> Australia
>
> Ph: +61-3-9658 4502
> Fax: +61-3-9658 4555
> Mobile: +61 429 177155
>
>
>
> From:<Oliver.Raymond at ga.gov.au>
> To:<Bruce.Simons at dpi.vic.gov.au>
> Date:        17/05/2011 10:38 AM
> Subject:        RE: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML        instance        documents ISSUE=33916 PROJ=9 [SEC=UNCLASSIFIED]
>
> ________________________________
>
>
>
>
> I presume that the 2 attached docs are OK in XML Spy?
>
>
>
>
> ________________________________
>
>
> From: auscope-geosciml-bounces at lists.arcs.org.au [mailto:auscope-geosciml-bounces at lists.arcs.org.au] On Behalf Of Bruce.Simons at dpi.vic.gov.au
> Sent: Tuesday, 17 May 2011 10:25 AM
> To: auscope-geosciml at lists.arcs.org.au
> Subject: Re: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents ISSUE=33916 PROJ=9 [SEC=UNCLASSIFIED]
>
> XMLSpy error:
>
> Schema at location 'http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd' has target namespace 'http://xmlns.geosciml.org/GeoSciML/3.0' rather than 'http://xmlns.geosciml.org/LaboratoryAnalysis-Specimen/3.0'.
>        Details
>                schema_reference: Schema at location 'http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd' has target namespace 'http://xmlns.geosciml.org/GeoSciML/3.0' rather than 'http://xmlns.geosciml.org/LaboratoryAnalysis-Specimen/3.0'.
>
>
> ----------------------------------------------------
> Bruce Simons
> Senior Information Geoscientist
> IUGS-Commission for Geoscience Information Oceania Councillor
> GeoScience Victoria/Australian Spatial Research Data Commons
> Level 9, 55 Collins St
> PO Box 4440
> Melbourne, Victoria, 3001
> Australia
>
> Ph: +61-3-9658 4502
> Fax: +61-3-9658 4555
> Mobile: +61 429 177155
>
>
>
> From:<Oliver.Raymond at ga.gov.au>
> To:<auscope-geosciml at lists.arcs.org.au>
> Date:        17/05/2011 10:09 AM
> Subject:        Re: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance        documents ISSUE=33916 PROJ=9 [SEC=UNCLASSIFIED]
> Sent by:        auscope-geosciml-bounces at lists.arcs.org.au
>
>
> ________________________________
>
>
>
>
>
> Hi Bruce,
>
> Could you try the attached instance doc which serialises a feature from the Laboratory Analysis package, but also uses the root geosciml.xsd.
>
> I’d like to see the error message you get. (It validates for me in Oxygen)
>
> Cheers,
> Ollie
>
> _______________________________________________________________________
>
> Ollie Raymond
>
> Project Leader
> National Geological Maps and Data Standards Project<http://www.ga.gov.au/minerals/projects/current-projects/geological-maps-standards.html>
> Geoscience Australia
>
> Interoperability Working Group<https://www.seegrid.csiro.au/wiki/bin/view/CGIModel/InteroperabilityWG>
> IUGS Commission for the Management and Application of Geoscience Information
>
> Address: GPO Box 378, Canberra, ACT, 2601, Australia | ABN: 80 091 799 039
> Ph: +61 2 62499575  |  Fax: +61 2 62479992  |  Email: oliver.raymond at ga.gov.au<mailto:oliver.raymond at ga.gov.au>   |  Google Map<http://maps.google.com/maps?f=q&hl=en&geocode=&q=canberra+australia&ie=UTF8&ll=-35.344028,149.158362&spn=0.007684,0.016404&t=h&z=17&iwloc=addr&om=1>
> _______________________________________________________________________
>
> --- This message was created with 100% recycled electrons ---
>
>
>
>
> ________________________________
>
>
>
> From: auscope-geosciml-bounces at lists.arcs.org.au [mailto:auscope-geosciml-bounces at lists.arcs.org.au] On Behalf Of Bruce.Simons at dpi.vic.gov.au
> Sent: Tuesday, 17 May 2011 9:17 AM
> To: auscope-geosciml at lists.arcs.org.au
> Subject: [auscope-geosciml] Fw: XMLSpy refuses to validate GeoSciML instance documents ISSUE=33916 PROJ=9
>
> Response to Marcus' comments from Altova below.
> Altova believe they are strictly following the specifications and our schema are at fault.
>
> Whether Altova are correct or not I believe we should clean up the GeoSciML schema so that they work in XMLSpy from the canonical source rather than local catalogs.
>
> I am unable to prepare any Testbed 4 instances until I can get XMLSpy to work with GeoSciML v3.
>
> ----------------------------------------------------
> Bruce Simons
> Senior Information Geoscientist
> IUGS-Commission for Geoscience Information Oceania Councillor
> GeoScience Victoria/Australian Spatial Research Data Commons
> Level 9, 55 Collins St
> PO Box 4440
> Melbourne, Victoria, 3001
> Australia
>
> Ph: +61-3-9658 4502
> Fax: +61-3-9658 4555
> Mobile: +61 429 177155
> ----- Forwarded by Bruce Simons/DPI/VICGOV1 on 17/05/2011 09:04 AM -----
>
> From:        Altova Technical Support Team<afpsup at altova.com>
> To:        Bruce.Simons at dpi.vic.gov.au
> Date:        17/05/2011 01:52 AM
> Subject:        XMLSpy refuses to validate GeoSciML instance documents ISSUE=33916 PROJ=9
>
>
>
> ________________________________
>
>
>
>
>
>
> When replying, type your text above this line.
> ----------------------------------------------
> Case # :       33916
> Submitted on:  2011-05-16 01:58:46
>
> First Name:    Bruce
> Last Name:     Simons
> Company:       GeoScience Victoria
> Email:         Bruce.Simons at dpi.vic.gov.au
> Alt Email:     Bruceasimons at hotmail.com
> Country:       Australia
> KeyCode:       80WA5J9-CH4M7X8-07YX0P8-71LMYC9-TXJHPY1
>
> Product:       XMLSpy_Professional_Edition
> Version:       2011r2
> OS:            win_xp
> OS SP:
> OS Language:
> IE Version:    ff3.6
> IE SP:
>
> -------------------------------------------------------------------
> Summary:       XMLSpy refuses to validate GeoSciML instance documents
>
> -------------------------------------------------------------------
>
> Entered on 2011-05-16 at 17:51:27 by Riccardo Corona:
> Dear Bruce,
>
> Thank you for contacting us.
>
> The first error appears to be reasonable in my opinion: in fact the 'schemaLocation' element in the instance XML document tries to load a Schema
> document with namespace 'http://xmlns.geosciml.org/GeoSciML-Core/3.0', while such Schema actually has 'http://xmlns.geosciml.org/GeoSciML/3.0' defined
> as targetnamespace. The general mechanism is explained here:
>
> http://www.w3schools.com/schema/schema_schema.asp
>
> I believe the Altova engine implements the most strict strategy suggested by the specification:
>
> http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#schema_reference
>
> Regarding the error on the Schema: this again appears to be correctly raised by the validator. In fact even if the section:
>
> http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#sch-props-correct
>
> ..is a subsection of '3.15 Schemas as a Whole', it clearly refers to *all* the Schemas that concur to the creation of the 'Schema as a whole'. All
> those Schemas must respect the constraints:
>
> ****************************
> 3.15.6 Constraints on Schemas as a Whole
>
> All schemas (see Schemas as a Whole (§3.15)) must satisfy the following constraint.
> [...]
> ****************************
>
> Perhaps you missed the above two lines because when you open the link from the error message in XMLSpy, you are prompted directly to the subsequent
> constraints.
>
> Please let me know whether the above points sound correct to you.
>
> Best regards,
>
> Riccardo Corona
> Support Engineer
> Altova GmbH
> www.altova.com
>
> ________________________________________
> This e-mail and any attachments are intended only for the person/entity to which they are addressed and may contain confidential and/or privileged
> material. If you received this in error, please notify the sender and delete the message.
> Altova GmbH, Firmenbuch: FN 50760 y, Sitz: Wien, DVR: 0692450, Handelsgericht: Wien, Rechtsform: Ges.m.b.H., UID: ATU16136802.
>
> Entered on 2011-05-16 at 01:58:44 by bruce.simons at dpi.vic.gov.au:
> Description:
>
> When trying to validate a GeoSciML instance document (see attached) XMLSpy reports two errors:
> 1. Namespace Error
> GeoSciML\branches\3.0.0_rc2\instances\GA_MappedFeature_GeologicUnit_wfs 2.0.xml could not be validated because of an error in XML Schema/DTD (see below)         Schema at location 'http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd' has target namespace 'http://xmlns.geosciml.org/GeoSciML/3.0' rather than 'http://xmlns.geosciml.org/GeoSciML-Core/3.0'.                 Details                         schema_reference: Schema at location 'http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd' has target namespace 'http://xmlns.geosciml.org/GeoSciML/3.0' rather than 'http://xmlns.geosciml.org/GeoSciML-Core/3.0'.
>
> oXygen validates the geosciml.xsd schema and the GA instances.
>
> I have tried re-reading the XML Schema spec. and although I'm not confident in my reading of this I don't think it is an error for the target namespace not to be the same. Loading the schema document at 'http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd' will give a schema which can be used to validate elements in the 'http://xmlns.geosciml.org/GeoSciML-Core/3.0' namespace. In particular, the part of the spec referred to by XMLSpy in its error message (http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#schema_reference) doesn't seem to imply this. So I *think* XMLSpy is wrong on this. (Note the rules for schemaLocation on import elements do require the target namespace of the referred schema be the same as the namespace attribute but this is not the same as the rules on the xsi:schemaLocation attribute on an instance document element.)
>
> 2. On switching the namespace (to overcome Error 1) obtain "already declared" error.
>
> Changing the namespace in the instance document to "http://xmlns.geosciml.org/GeoSciML/3.0<http://xmlns.geosciml.org/GeoSciML/3.0>  http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd<http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd>  " results in the following error (the exact error varies but is always related to an already declared property):
> 'sam:SamplingFeatureComplex' is already declared in schema document 'http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd'.
>       Error location: schema / element
> Details
>               sch-props-correct.2: 'sam:SamplingFeatureComplex' is already declared in schema document 'http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd'.
>
> Again switching the namespace to http://xmlns.geosciml.org/GeoSciML/3.0 also works in oXygen.
>
> The part of the Schema spec that XML Spy is pointing to for this to be an error is http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#sch-props-correct about a schema not having more than one component with the same name but this refers to the final schema that gets constructed in the usual case according to the rules in Section 4 (http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#composition) which, as far as I can make out, mean that it is OK to be importing the same definitions twice. In the above case, for example, the documents https://www.seegrid.csiro.au/subversion/GeoSciML/ISO19156_xsd/schemas/OM/om/2.0/observation.xsd and ://schemas.opengis.net/om/2.0/observation.xsd both have the same (empty) definition for the element {http://www.opengis.net/om/2.0, result}. So again I *think* that XMLSpy is wrong to say this is invalid.
>
> Steps To Reproduce:
>
> Reproduce Error 1:
> 1. Open XMLSpy
> 2. Load Attached Instance document
>
> Reproduce error 2:
> 1. Repeat for error 1
> 2. Replace
> xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd
>               http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd
>               http://xmlns.geosciml.org/GeoSciML-Core/3.0 http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd"
>
> with:
> xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd
>               http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd
>               http://xmlns.geosciml.org/GeoSciML/3.0 http://schemas.geosciml.org/geosciml/3.0/geosciml.xsd"
>
> -------------------------------------------------------------------
>
> .. Altova Technical Support Group
>
>
> Altova GmbH
> www.altova.com
>
> ________________________________________________________________________________________________________________________
> This e-mail and any attachments are intended only for the person/entity to which they are addressed and may contain
> confidential and/or privileged material. If you received this in error, please notify the sender and delete the message.
> Altova GmbH, Firmenbuch: FN 50760 y, Sitz: Wien, DVR: 0692450, Handelsgericht: Wien, Rechtsform: Ges.m.b.H., UID:
>
> ATU16136802.
>
> Notice:
> This email and any attachments may contain information that is personal, confidential,
> legally privileged and/or copyright. No part of it should be reproduced, adapted or communicated without the prior written consent of the copyright owner.
>
> It is the responsibility of the recipient to check for and remove viruses.
>
> If you have received this email in error, please notify the sender by return email, delete it from your system and destroy any copies. You are not authorised to use, communicate or rely on the information contained in this email.
>
> Please consider the environment before printing this email.
>
>
>
>
>
>   _______________________________________________
> auscope-geosciml mailing list
> auscope-geosciml at lists.arcs.org.au
> http://lists.arcs.org.au/cgi-bin/mailman/listinfo/auscope-geosciml
>
> "D卌#9ߓM4­Ÿԅ8Ԭ7㓽‑[1]8b隊Vu򪛚rۦk'(֢)ߢ*'ʞʧjW(z{bjPQ蚖\+╨‑uݾܢmSLSM⪓h.֞ꫡۜy֝j^vܢi'翔㓔㓽‑[1]*+¸霢{‑ڟm ޯ񎵿ŸԿ<񎵻"ͭ8ԟiǀ&"جzʨțXʇ텪޲*bz{mȞrG譩ݭ騽뢮랳񎵿ŸԿ<񎵷ڱૉl7!zz+޶آ隊Xz讙^jǧ؟ʘ^靺򭫮wj)]zWz+_ꬊ˞ݵ뭮'('b騵Ⱨm랲xjרʉ텨~檘ʧyاzf񎵿ϼSM⪗(҈{c幫‑r쉗y֞~ަ)඘zf񎵿ϼSM⪛"ͭ㓝)󧮊[attachment "TestLabAnalysisDocNo2ForBruce.xml" deleted by Bruce Simons/DPI/VICGOV1] [attachment "TestLabAnalysisDocNo3ForBruce.xml" deleted by Bruce Simons/DPI/VICGOV1]
> ________________________________
>
> Ÿԟiǀ&,ޘڭǿ㓔㓲ܥx[1](dNPЂ8}4ӀQSLSNȳ{aN57ڱૉS+‑jwZ&!魲fr❺+b{ajجꬢvr߉ק&^eʚ⾩^皝ߨʩʸ߅8ԅ8ԟiǀ&6Zڟۡ靭Ꞧǝi֩稭ʦ颱^w񎵱N57ڱૉpبۡz⢼+۞ʧ魡ayʩʸڰ꿔㓼SO󏔣S,ޘSM⪒-ˡz쉸ܨ~؞碦'ڜ社ڝڞ޾*?㓼SO󏔣S}‑[1]ȳ{b­ʋj筆+‑w镦zz-랝׫o*޶ꧺfץzע蛪.̬隝מڨɩ򲊢zƨޞZب+‑vڮ稚kƭz뺜؞w讦ܢ{Zw{aǦj)㓼󅸔ߩǀ&rhMW稞ȝzay鯊'魭稭꫊{b
> aǦj)㓼󅸔ߩǀ&,ޛ񎵹۲Ͼv짳ϝ)_______________________________________________
> auscope-geosciml mailing list
> auscope-geosciml at lists.arcs.org.au
> http://lists.arcs.org.au/cgi-bin/mailman/listinfo/auscope-geosciml
>
> �8��iǀ�&��,���-�ǿ�S�S�ܥx(dNP��8��}�4�@Q�S�LS�Nȳ{aN57�q�+��S�+���jwZ�&���!���f�r��j)��+��b�{ajج���v�r�߉ק�&�^��eʚ�)^��Z����)ʸ����8��8��iǀ�&�6�Z����!��]m�ަ��ǝi֩��h��&���q�^w�N51N57�q�+��p��h��az�⢼+��^��'����ay�)ʸ���0����S�S�O���S�,��S�M��x �jR-��az����쉸��ܨ~�^��"�'�����$~�ڝ�ޚ�޾*��?�S�S�O���S}����ȳ{bʋ�j��yǢ��m�+����w�����zz-������׫o*޶��zf��ץzע���*.�̬�隝�^���ɩ�r�bz�(��ޞ�Z��h�+v�.��(�k��ƭz��z\���^�w�f���ܢ{Z�w��{a�Ǧj)�S���8��iǀ�&�r�h�M<�M,�7�>W���(�ȝzï¿
½ay�'���m���k�{b� a�Ǧj)�S���8��iǀ�&��,���N59۲��>v��ϝ�)�

-- 
Ben Caradoc-Davies <Ben.Caradoc-Davies at csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre



More information about the GeoSciML mailing list