[auscope-geosciml] An XML schema question - use of "nillable" with element type "string" [SEC=UNCLASSIFIED]

Oliver.Raymond at ga.gov.au Oliver.Raymond at ga.gov.au
Wed Aug 24 20:29:32 EDT 2011

Thanks Clemens.  That works.  I thought I had tried this already, but I must have had a typo in my code....  :(

From: auscope-geosciml-bounces at lists.arcs.org.au [mailto:auscope-geosciml-bounces at lists.arcs.org.au] On Behalf Of Clemens Portele
Sent: Thursday, 25 August 2011 3:45 AM
To: auscope-geosciml at lists.arcs.org.au
Cc: fullmoon at lists.arcs.org.au
Subject: Re: [auscope-geosciml] An XML schema question - use of "nillable" with element type "string" [SEC=UNCLASSIFIED]

Hi Ollie,


<element name="primaryGuidingCriterion" type="string" nillable="true">

you can encode an instance element as nil, but without a nilReason attribute. I.e.:

<primaryGuidingCriterion xsi:nil="true" nilReason="unknown"/>

is invalid due to the undeclared nilReason attribute,

<primaryGuidingCriterion xsi:nil="true"/>

is valid.

To allow also nilReason attributes this has to be explicitly declared in the schema, i.e.

      <element name="primaryGuidingCriterion" nillable="true">
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>


Am 22.08.2011 um 00:02 schrieb <Oliver.Raymond at ga.gov.au<mailto:Oliver.Raymond at ga.gov.au>> <Oliver.Raymond at ga.gov.au<mailto:Oliver.Raymond at ga.gov.au>>:

Dear XML schema and FullMoon gurus,

There have several places in the GeoSciML model where we have nillable (voidable) attributes of type "CharacterString".

For example:

These "CharacterString" elements (from ISO19103 Schema Language:BasicTypes) are encoded in the schema by FullMoon like this:
<element name="primaryGuidingCriterion" type="string" nillable="true">

Although the schema document validates with this encoding, it appears that you cannot actually deliver xsi:nil="true" in an instance document like this:
<primaryGuidingCriterion xsi:nil="true" nilReason="unknown"/>

But "string" is a simple type element and I understand cannot have attributes like "nil".  So it looks to me that you just have to deliver an empty element, like this:

1.  Is it possible to deliver "nil +/- nilReason" with a string element?
2.  If not, is FullMoon in error in encoding nillable="true" in the schema for "string" types?
3.  Is the GeoSciML UML model in error in having "nillable" tags on CharacterString elements?



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 62499917  |  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 ---

auscope-geosciml mailing list
auscope-geosciml at lists.arcs.org.au<mailto:auscope-geosciml at lists.arcs.org.au>

Clemens Portele
portele at interactive-instruments.de<mailto:portele at interactive-instruments.de>
+49 228 9141073 (office)
+49 151 15298497 (mobile)

interactive instruments Gesellschaft für Software-Entwicklung mbH
Trierer Str. 70-72, 53115 Bonn, Germany
Geschäftsführer: Reinhard Erstling, Karla Hinzer, Clemens Portele, Bernd Weidner
Amtsgericht Bonn, HRB 3872

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/geosciml/attachments/20110825/6c639231/attachment.htm>

More information about the GeoSciML mailing list