Hi,
I've noticed that GN has problems with validation of some elements where
substiutionGroup is used. This error occurs when complex type is used to
substitute simple type (CharacterString). I've found two such elements:
Anchor and FileName. Can you fix this bug ?? I include error which occurs in
that situation and my xml file for tests:
2007-07-20 14:37:29,194 DEBUG [jeeves.webapp.util.import] - Importing :
C:\pliki_XML\iso19139_nasze\test\ortofotomapa_lotnicza_dataset.xml
2007-07-20 14:37:31,835 ERROR [jeeves.service] - Exception when executing
service
2007-07-20 14:37:31,835 ERROR [jeeves.service] - (C) Exc :
org.jdom.JDOMException: Exception in startElement: cvc-complex-type.2.4.a:
Invalid content was found starting with element 'Anchor'. One of
'{"http://www.isotc211.org/2005/gco":CharacterString\}' is expected.
2007-07-20 14:37:31,835 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
<message>Exception in startElement: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'Anchor'. One of
'{"http://www.isotc211.org/2005/gco":CharacterString\}' is
expected.</message>
<class>SAXException</class>
<stack>
<at class="org.jdom.transform.JDOMSource$DocumentReader"
file="JDOMSource.java" line="483" method="parse" />
<at
class="com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl"
file="???" line="-1" method="process" />
<at
class="com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl"
file="???" line="-1" method="validate" />
<at class="javax.xml.validation.Validator" file="???" line="-1"
method="validate" />
<at class="jeeves.utils.Xml" file="Xml.java" line="231"
method="validate" />
<at class="org.fao.geonet.kernel.DataManager" file="DataManager.java"
line="277" method="validate" />
<at class="org.fao.geonet.services.metadata.ImportFromDir"
file="ImportFromDir.java" line="164" method="standardImport" />
<at class="org.fao.geonet.services.metadata.ImportFromDir"
file="ImportFromDir.java" line="116" method="exec" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="238" method="execService" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="141" method="execServices" />
</stack>
<request>
<language>en</language>
<service>util.import</service>
</request>
</error>
----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<MD_Metadata xmlns="http://www.isotc211.org/2005/gmd"
uuid="71ebcf00-14b6-4852-a016-306b72b56b0a"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gml="http://www.isotc211.org/2005/gml"
xmlns:gmx="http://www.isotc211.org/2005/gmx">
<fileIdentifier>
<gco:CharacterString>71ebcf00-14b6-4852-a016-306b72b56b0a</gco:CharacterString>
</fileIdentifier>
<language>
<gco:CharacterString>pol</gco:CharacterString>
</language>
<characterSet>
<MD_CharacterSetCode
codeList="./resources/codeList.xml#MD_CharacterSetCode"
codeListValue="utf8">utf8</MD_CharacterSetCode>
</characterSet>
<parentIdentifier>
<gco:CharacterString>0d66d03d-2677-4642-8bdd-110136446bc1</gco:CharacterString>
</parentIdentifier>
<hierarchyLevel>
<MD_ScopeCode codeList="./resources/codeList.xml#MD_ScopeCode"
codeListValue="dataset">dataset</MD_ScopeCode>
</hierarchyLevel>
<contact>
<CI_ResponsibleParty uuid="8">
<organisationName>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact uuid="1">
<phone>
<CI_Telephone>
<voice>
<gco:CharacterString>+480221111111</gco:CharacterString>
</voice>
<facsimile>
<gco:CharacterString>+480221111111</gco:CharacterString>
</facsimile>
</CI_Telephone>
</phone>
<address>
<CI_Address>
<deliveryPoint>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</deliveryPoint>
<city>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</city>
<administrativeArea>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</administrativeArea>
<postalCode>
<gco:CharacterString>11-111</gco:CharacterString>
</postalCode>
<country>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</country>
<electronicMailAddress>
<gco:CharacterString>aaaaaaaa@anonymised.com</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
<onlineResource>
<CI_OnlineResource>
<linkage>
<URL>http://www.aaaaaaaa.pl</URL>
</linkage>
</CI_OnlineResource>
</onlineResource>
<hoursOfService>
<gco:CharacterString>Godziny pracy w dni powszednie 7.45-15.45.
W weekendy zamknięte.</gco:CharacterString>
</hoursOfService>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode codeList="./resources/codeList.xml#CI_RoleCode"
codeListValue="author">author</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</contact>
<dateStamp>
<gco:DateTime>2007-06-20T09:45:00</gco:DateTime>
</dateStamp>
<metadataStandardName>
<gco:CharacterString>ISO 19115 Geographic Information -
Metadata</gco:CharacterString>
</metadataStandardName>
<metadataStandardVersion>
<gco:CharacterString>First Edition 2003-05-01</gco:CharacterString>
</metadataStandardVersion>
<referenceSystemInfo>
<MD_ReferenceSystem uuid="3">
<referenceSystemIdentifier>
<RS_Identifier>
<authority>
<CI_Citation>
<title>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</title>
<date>
<CI_Date>
<date>
<gco:Date>2007-02-02</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="./resources/codeList.xml#CI_DateTypeCode"
codeListValue="revision">revision</CI_DateTypeCode>
</dateType>
</CI_Date>
</date>
<citedResponsibleParty>
<CI_ResponsibleParty uuid="36">
<organisationName>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact uuid="5">
<phone>
<CI_Telephone>
<voice>
<gco:CharacterString>+480221111111</gco:CharacterString>
</voice>
<facsimile>
<gco:CharacterString>+480221111111</gco:CharacterString>
</facsimile>
</CI_Telephone>
</phone>
<address>
<CI_Address>
<deliveryPoint>
<gco:CharacterString>111-111
aaaaaaaa</gco:CharacterString>
</deliveryPoint>
<city>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</city>
<administrativeArea>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</administrativeArea>
<postalCode>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</postalCode>
<country>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</country>
<electronicMailAddress>
<gco:CharacterString>aaaaaaaa@anonymised.com</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
<onlineResource>
<CI_OnlineResource>
<linkage>
<URL>http://www.aaaaaaaa.uk</URL>
</linkage>
</CI_OnlineResource>
</onlineResource>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode
codeList="./resources/codeList.xml#CI_RoleCode"
codeListValue="publisher">publisher</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</citedResponsibleParty>
</CI_Citation>
</authority>
<code>
<Anchor
xlink:href="http://www.epsg.org/databases/epsg-v6_12.zip">2180</Anchor>
</code>
</RS_Identifier>
</referenceSystemIdentifier>
</MD_ReferenceSystem>
</referenceSystemInfo>
<series xlink:href="./ortofotomapa_lotnicza_seria.xml"
xlink:type="simple"/>
<identificationInfo>
<MD_DataIdentification>
<citation>
<CI_Citation>
<title>
<gco:CharacterString>N-34-127-C-a-3</gco:CharacterString>
</title>
<alternateTitle>
<gco:CharacterString>brak wartości</gco:CharacterString>
</alternateTitle>
<date>
<CI_Date>
<date>
<gco:Date>2002</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="./resources/codeList.xml#CI_DateTypeCode"
codeListValue="creation">creation</CI_DateTypeCode>
</dateType>
</CI_Date>
</date>
<date>
<CI_Date>
<date>
<gco:Date>2002</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="./resources/codeList.xml#CI_DateTypeCode"
codeListValue="publication">publication</CI_DateTypeCode>
</dateType>
</CI_Date>
</date>
<citedResponsibleParty>
<CI_ResponsibleParty uuid="20">
<organisationName>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact uuid="10">
<phone>
<CI_Telephone>
<voice>
<gco:CharacterString>+480221111111</gco:CharacterString>
</voice>
<facsimile>
<gco:CharacterString>+480221111111</gco:CharacterString>
</facsimile>
</CI_Telephone>
</phone>
<address>
<CI_Address>
<deliveryPoint>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</deliveryPoint>
<city>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</city>
<administrativeArea>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</administrativeArea>
<postalCode>
<gco:CharacterString>11-111</gco:CharacterString>
</postalCode>
<country>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</country>
<electronicMailAddress>
<gco:CharacterString>aaaaaaaa@anonymised.com</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
<onlineResource>
<CI_OnlineResource>
<linkage>
<URL>http://www.aaaaaaaa.pl</URL>
</linkage>
</CI_OnlineResource>
</onlineResource>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode codeList="./resources/codeList.xml#CI_RoleCode"
codeListValue="originator">originator</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</citedResponsibleParty>
<presentationForm>
<CI_PresentationFormCode
codeList="./resources/codeList.xml#CI_PresentationFormCode"
codeListValue="mapDigital">mapDigital</CI_PresentationFormCode>
</presentationForm>
</CI_Citation>
</citation>
<abstract>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</abstract>
<purpose>
<gco:CharacterString>Wykonanie aktualnego opracowania
fotogrametrycznego.</gco:CharacterString>
</purpose>
<status>
<MD_ProgressCode codeList="./resources/codeList.xml#MD_ProgressCode"
codeListValue="completed">completed</MD_ProgressCode>
</status>
<pointOfContact>
<CI_ResponsibleParty uuid="1">
<organisationName>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact uuid="1">
<phone>
<CI_Telephone>
<voice>
<gco:CharacterString>+480221111111</gco:CharacterString>
</voice>
<facsimile>
<gco:CharacterString>+480221111111</gco:CharacterString>
</facsimile>
</CI_Telephone>
</phone>
<address>
<CI_Address>
<deliveryPoint>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</deliveryPoint>
<city>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</city>
<administrativeArea>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</administrativeArea>
<postalCode>
<gco:CharacterString>11-111</gco:CharacterString>
</postalCode>
<country>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</country>
<electronicMailAddress>
<gco:CharacterString>aaaaaaaa@anonymised.com</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
<onlineResource>
<CI_OnlineResource>
<linkage>
<URL>http://www.aaaaaaaa.pl</URL>
</linkage>
</CI_OnlineResource>
</onlineResource>
<hoursOfService>
<gco:CharacterString>Godziny pracy w dni powszednie
7.45-15.45. W weekendy zamknięte.</gco:CharacterString>
</hoursOfService>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode codeList="./resources/codeList.xml#CI_RoleCode"
codeListValue="pointOfContact">pointOfContact</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</pointOfContact>
<resourceMaintenance>
<MD_MaintenanceInformation>
<maintenanceAndUpdateFrequency>
<MD_MaintenanceFrequencyCode
codeList="./resources/codeList.xml#MD_MaintenanceFrequencyCode"
codeListValue="notPlanned">notPlanned</MD_MaintenanceFrequencyCode>
</maintenanceAndUpdateFrequency>
<maintenanceNote gco:nilReason="inapplicable" />
</MD_MaintenanceInformation>
</resourceMaintenance>
<graphicOverview>
<MD_BrowseGraphic>
<fileName>
<FileName
src="http://www.gismazowsza.pl/database/mdGrapOvView/036_wisla.jpg">PrzeglÄ…danie</FileName>
</fileName>
<fileDescription>
<gco:CharacterString>Fragment opracowania.</gco:CharacterString>
</fileDescription>
<fileType>
<gmx:MimeFileType type="image/jpeg">Plik graficzny
JPEG</gmx:MimeFileType>
</fileType>
</MD_BrowseGraphic>
</graphicOverview>
<resourceFormat>
<MD_Format uuid="16">
<name>
<gco:CharacterString>dgn</gco:CharacterString>
</name>
<version>
<gco:CharacterString>V7</gco:CharacterString>
</version>
</MD_Format>
</resourceFormat>
<resourceFormat>
<MD_Format uuid="16">
<name>
<gco:CharacterString>dwg</gco:CharacterString>
</name>
<version gco:nilReason="unknown" />
</MD_Format>
</resourceFormat>
<resourceFormat>
<MD_Format uuid="16">
<name>
<gco:CharacterString>cdr</gco:CharacterString>
</name>
<version gco:nilReason="unknown" />
</MD_Format>
</resourceFormat>
<resourceFormat>
<MD_Format uuid="15">
<name>
<gco:CharacterString>cot</gco:CharacterString>
</name>
<version gco:nilReason="unknown" />
</MD_Format>
</resourceFormat>
<resourceFormat>
<MD_Format uuid="8">
<name>
<gco:CharacterString>t</gco:CharacterString>
</name>
<version gco:nilReason="unknown" />
</MD_Format>
</resourceFormat>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>ortofotomapa</gco:CharacterString>
</keyword>
<keyword>
<gco:CharacterString>pokrycie terenu</gco:CharacterString>
</keyword>
<type>
<MD_KeywordTypeCode
codeList="./resources/codeList.xml#MD_KeywordTypeCode"
codeListValue="theme">theme</MD_KeywordTypeCode>
</type>
</MD_Keywords>
</descriptiveKeywords>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</keyword>
<type>
<MD_KeywordTypeCode
codeList="./resources/codeList.xml#MD_KeywordTypeCode"
codeListValue="place">place</MD_KeywordTypeCode>
</type>
</MD_Keywords>
</descriptiveKeywords>
<resourceConstraints>
<MD_LegalConstraints uuid="1">
<accessConstraints>
<MD_RestrictionCode
codeList="./resources/codeList.xml#MD_RestrictionCode"
codeListValue="license">license</MD_RestrictionCode>
</accessConstraints>
<useConstraints>
<MD_RestrictionCode
codeList="./resources/codeList.xml#MD_RestrictionCode"
codeListValue="license">license</MD_RestrictionCode>
</useConstraints>
<otherConstraints>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</otherConstraints>
</MD_LegalConstraints>
</resourceConstraints>
<resourceConstraints>
<MD_SecurityConstraints>
<classification>
<MD_ClassificationCode
codeList="./resources/codeList.xml#MD_ClassificationCode"
codeListValue="unclassified">unclassified</MD_ClassificationCode>
</classification>
</MD_SecurityConstraints>
</resourceConstraints>
<spatialRepresentationType>
<MD_SpatialRepresentationTypeCode
codeList="./resources/codeList.xml#MD_SpatialRepresentationTypeCode"
codeListValue="vector">vector</MD_SpatialRepresentationTypeCode>
</spatialRepresentationType>
<spatialRepresentationType>
<MD_SpatialRepresentationTypeCode
codeList="./resources/codeList.xml#MD_SpatialRepresentationTypeCode"
codeListValue="grid">grid</MD_SpatialRepresentationTypeCode>
</spatialRepresentationType>
<spatialResolution>
<MD_Resolution>
<distance>
<gco:Distance uom="m">0.00</gco:Distance>
</distance>
</MD_Resolution>
</spatialResolution>
<language>
<gco:CharacterString>pol</gco:CharacterString>
</language>
<topicCategory>
<MD_TopicCategoryCode>imageryBaseMapsEarthCover</MD_TopicCategoryCode>
</topicCategory>
<extent>
<EX_Extent>
<geographicElement>
<EX_GeographicBoundingBox uuid="6">
<westBoundLongitude>
<gco:Decimal>21.000000</gco:Decimal>
</westBoundLongitude>
<eastBoundLongitude>
<gco:Decimal>21.062500</gco:Decimal>
</eastBoundLongitude>
<southBoundLatitude>
<gco:Decimal>52.416667</gco:Decimal>
</southBoundLatitude>
<northBoundLatitude>
<gco:Decimal>52.458333</gco:Decimal>
</northBoundLatitude>
</EX_GeographicBoundingBox>
</geographicElement>
<temporalElement>
<EX_TemporalExtent>
<extent>
<gml:TimeInstant>
<gml:timePosition>2001</gml:timePosition>
</gml:TimeInstant>
</extent>
</EX_TemporalExtent>
</temporalElement>
</EX_Extent>
</extent>
</MD_DataIdentification>
</identificationInfo>
<distributionInfo>
<MD_Distribution>
<distributionFormat>
<MD_Format uuid="15">
<name>
<gco:CharacterString>cot</gco:CharacterString>
</name>
<version gco:nilReason="unknown" />
</MD_Format>
</distributionFormat>
<distributionFormat>
<MD_Format uuid="8">
<name>
<gco:CharacterString>geoTiff</gco:CharacterString>
</name>
<version>
<gco:CharacterString>1</gco:CharacterString>
</version>
</MD_Format>
</distributionFormat>
<distributionFormat>
<MD_Format uuid="8">
<name>
<gco:CharacterString>geoTiff</gco:CharacterString>
</name>
<version>
<gco:CharacterString>1</gco:CharacterString>
</version>
</MD_Format>
</distributionFormat>
<transferOptions>
<MD_DigitalTransferOptions>
<unitsOfDistribution>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</unitsOfDistribution>
</MD_DigitalTransferOptions>
</transferOptions>
<transferOptions>
<MD_DigitalTransferOptions>
<unitsOfDistribution>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</unitsOfDistribution>
</MD_DigitalTransferOptions>
</transferOptions>
<transferOptions>
<MD_DigitalTransferOptions>
<unitsOfDistribution>
<gco:CharacterString>aaaaaaaa</gco:CharacterString>
</unitsOfDistribution>
</MD_DigitalTransferOptions>
</transferOptions>
</MD_Distribution>
</distributionInfo>
</MD_Metadata>
--
View this message in context: http://www.nabble.com/problem-with-substitutionGroup-tf4116813s18419.html#a11707414
Sent from the geonetwork-devel mailing list archive at Nabble.com.