pabigot / pyxb

Python XML Schema Bindings
Apache License 2.0
130 stars 74 forks source link

schema binding warnings #60

Closed dotzhou closed 8 years ago

dotzhou commented 8 years ago

I tried to schema binding, but it failed for external schemas. I am sure it is not networking issues.

I have to use local schema as below.

It has lots of warnings, I suspect my schema binding job, however, the XML file parsing seems to be working properly. I have issues to write XML against schema. ` $ pyxbgen -u siteLog.xsd -m geo WARNING:pyxb.binding.generate:Element use {http://www.opengis.net/gml/3.2}KnotType.{http://www.opengis.net/gml/3.2}value renamed to value WARNING:pyxb.binding.generate:Element use {http://www.opengis.net/om/2.0}NamedValueType.{http://www.opengis.net/om/2.0}value renamed to value WARNING:pyxb.binding.generate:Element use None.{urn:xml-gov-au:icsm:egeodesy:0.3}content renamed to content WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}gnssAntennaHeightMeasurementType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}AnyOperandType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}AnyResultType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}adjustedPositionQualityType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value_ WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}siteIdentificationType.{urn:xml-gov-au:icsm:egeodesy:0.3}distance-Activity renamed to distance_Activity WARNING:pyxb.binding.generate:Element use None.{urn:xml-gov-au:icsm:egeodesy:0.3}latitude-North renamed to latitude_North WARNING:pyxb.binding.generate:Element use None.{urn:xml-gov-au:icsm:egeodesy:0.3}longitude-East renamed to longitude_East WARNING:pyxb.binding.generate:Element use None.{urn:xml-gov-au:icsm:egeodesy:0.3}elevation-m_ellips. renamed to elevation_mellips WARNING:pyxb.binding.generate:Element use {http://www.opengis.net/gml/3.2}ParameterValueType.{http://www.opengis.net/gml/3.2}value renamed to value WARNING:pyxb.binding.generate:Attribute {http://www.w3.org/1999/xlink}extended.{http://www.w3.org/1999/xlink}title renamed to title WARNING:pyxb.binding.generate:Attribute {http://www.w3.org/1999/xlink}locatorType.{http://www.w3.org/1999/xlink}title renamed to title WARNING:pyxb.binding.generate:Attribute {http://www.w3.org/1999/xlink}arcType.{http://www.w3.org/1999/xlink}title renamed to title WARNING:pyxb.binding.generate:Attribute {http://www.w3.org/1999/xlink}arcType.{http://www.w3.org/1999/xlink}from renamed to from WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}MeasurementPointType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}MeasurementLineType.{urn:xml-gov-au:icsm:egeodesy:0.3}value renamed to value WARNING:pyxb.binding.generate:Element use {http://www.isotc211.org/2005/gmd}DQ_ConformanceResult_Type.{http://www.isotc211.org/2005/gmd}pass renamed to pass_ WARNING:pyxb.binding.generate:Element use {http://www.isotc211.org/2005/gmd}DQ_QuantitativeResult_Type.{http://www.isotc211.org/2005/gmd}value renamed to value WARNING:pyxb.binding.generate:Attribute {http://www.opengis.net/gml/3.2}AbstractGriddedSurfaceType.rows renamed to rows WARNING:pyxb.binding.generate:Element use {http://www.opengis.net/gml/3.2}GridType.{http://www.opengis.net/gml/3.2}axisLabels renamed to axisLabels WARNING:pyxb.binding.generate:Complex type {urn:xml-gov-au:icsm:egeodesy:0.3}AbstractTimeSliceType renamed to AbstractTimeSliceType WARNING:pyxb.binding.generate:Complex type {urn:xml-gov-au:icsm:egeodesy:0.3}NodePropertyType renamed to NodePropertyType WARNING:pyxb.binding.generate:Complex type {http://www.opengis.net/gml/3.2}NodeType renamed to NodeType WARNING:pyxb.binding.generate:Complex type {urn:xml-gov-au:icsm:egeodesy:0.3}DynamicFeatureType renamed to DynamicFeatureType_ WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}gnssAntennaType.{urn:xml-gov-au:icsm:egeodesy:0.3}marker-arpUpEcc. renamed to marker_arpUpEcc WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}gnssAntennaType.{urn:xml-gov-au:icsm:egeodesy:0.3}marker-arpNorthEcc. renamed to marker_arpNorthEcc WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}gnssAntennaType.{urn:xml-gov-au:icsm:egeodesy:0.3}marker-arpEastEcc. renamed to marker_arpEastEcc WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}humiditySensorType.{urn:xml-gov-au:icsm:egeodesy:0.3}accuracy-percentRelativeHumidity renamed to accuracy_percentRelativeHumidity WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}pressureSensorType.{urn:xml-gov-au:icsm:egeodesy:0.3}accuracy-hPa renamed to accuracy_hPa WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}temperatureSensorType.{urn:xml-gov-au:icsm:egeodesy:0.3}accuracy-degreesCelcius renamed to accuracydegreesCelcius WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}SetupType.{urn:xml-gov-au:icsm:egeodesy:0.3}history renamed to history WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}PositionTimeSeriesType.{urn:xml-gov-au:icsm:egeodesy:0.3}history renamed to history WARNING:pyxb.binding.generate:Element use {urn:xml-gov-au:icsm:egeodesy:0.3}GNSSObservationQualityType.{urn:xml-gov-au:icsm:egeodesy:0.3}history renamed to history WARNING:pyxb.binding.generate:Complex type {http://www.opengis.net/gml/3.2}TransformationType renamed to TransformationType WARNING:pyxb.binding.generate:Element {http://www.isotc211.org/2005/gco}AbstractObject renamed to AbstractObject WARNING:pyxb.binding.generate:Element {urn:xml-gov-au:icsm:egeodesy:0.3}result renamed to result WARNING:pyxb.binding.generate:Element {http://www.opengis.net/gml/3.2}Boolean renamed to Boolean WARNING:pyxb.binding.generate:Element {urn:xml-gov-au:icsm:egeodesy:0.3}AbstractTimeSlice renamed to AbstractTimeSlice WARNING:pyxb.binding.generate:Element {http://www.opengis.net/gml/3.2}Node renamed to Node WARNING:pyxb.binding.generate:Element {urn:xml-gov-au:icsm:egeodesy:0.3}DynamicFeature renamed to DynamicFeature WARNING:pyxb.binding.generate:Element {http://www.opengis.net/gml/3.2}Transformation renamed to Transformation Python for urn:xml-gov-au:icsm:egeodesy:0.3 requires 10 modules

$ `

The generated modules are as below. Not sure "_nsgroup.py" is so large (8.6M)? other modules are remote locations except geo.

$ ls -lth total 8.9M 8.6M Sep 21 18:39 _nsgroup.py 34K Sep 21 18:39 geo.py 4.3K Sep 21 18:39 _om.py 79K Sep 21 18:39 _gml.py 9.3K Sep 21 18:39 _gco.py 43K Sep 21 18:39 _gmd.py 3.3K Sep 21 18:39 _gsr.py 3.5K Sep 21 18:39 _gss.py 3.6K Sep 21 18:39 _gts.py 46K Sep 21 18:39 _xlink.py $

Great thanks for your tips and feedback.

dotzhou commented 8 years ago

@pabigot :+1:

If you could help, that is great

Thanks to you in advance.

pabigot commented 8 years ago

Renaming warnings are expected; they result from the schema using names that aren't available because the name is already in use in the Python namespace. See this technical explanation. They're emitted as warning because, if you work with the corresponding attributes/types in Python the name will not be the same as it is in the schema.

The generated modules are large because the OpenGIS schemas are large.