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

Clemens Portele portele at interactive-instruments.de
Wed Aug 24 13:44:56 EDT 2011


Hi Ollie,

with

> <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">
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="nilReason" type="gml:NilReasonType"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>

Clemens


Am 22.08.2011 um 00:02 schrieb <Oliver.Raymond at ga.gov.au> <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:
>  <image001.jpg>
>  
> 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:
> <primaryGuidingCriterion/>  
>  
> 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?
>  
> Cheers,
> Ollie
> 
> _______________________________________________________________________
> 
> Ollie Raymond
> 
> Project Leader
> National Geological Maps and Data Standards Project
> Geoscience Australia
> 
> Interoperability Working Group
> 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  |  Google Map 
> __________________________________________________________________________________
> 
> --- This message was created with 100% recycled electrons ---
>  
> _______________________________________________
> auscope-geosciml mailing list
> auscope-geosciml at lists.arcs.org.au
> http://lists.arcs.org.au/cgi-bin/mailman/listinfo/auscope-geosciml

-- 
Clemens Portele
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/20110824/f2fa9e1d/attachment.htm>


More information about the GeoSciML mailing list