diff --git a/XmlSchemaClassGenerator.Tests/XmlTests.cs b/XmlSchemaClassGenerator.Tests/XmlTests.cs index 8fb7edc1..ef052e27 100644 --- a/XmlSchemaClassGenerator.Tests/XmlTests.cs +++ b/XmlSchemaClassGenerator.Tests/XmlTests.cs @@ -85,7 +85,7 @@ private static IEnumerable ConvertXml(string name, string xsd, Generator const string IS24Pattern = @"xsd\is24\*\*.xsd"; const string IS24ImmoTransferPattern = @"xsd\is24immotransfer\is24immotransfer.xsd"; - const string WadlPattern = @"xsd\wadl\*.xsd"; + const string WadlPattern = @"xsd\wadl\wadl.xsd"; const string ListPattern = @"xsd\list\list.xsd"; const string SimplePattern = @"xsd\simple\*.xsd"; const string ArrayOrderPattern = @"xsd\array-order\array-order.xsd"; @@ -96,6 +96,7 @@ private static IEnumerable ConvertXml(string name, string xsd, Generator const string VSTstPattern = @"xsd\vstst\vstst.xsd"; const string BpmnPattern = @"xsd\bpmn\*.xsd"; const string DtsxPattern = @"xsd\dtsx\dtsx2.xsd"; + const string WfsPattern = @"xsd\wfs\schemas.opengis.net\wfs\2.0\wfs.xsd"; // IATA test takes too long to perform every time @@ -447,6 +448,21 @@ public void TestVSTst() TestSamples("VSTst", VSTstPattern); } + [Fact, TestPriority(1)] + [UseCulture("en-US")] + public void TestWfs() + { + var output = new FileWatcherOutputWriter(Path.Combine("output", "wfs")); + Compiler.Generate("wfs", WfsPattern, + new Generator + { + OutputWriter = output, + EmitOrder = true, + GenerateInterfaces = false + }); + TestSamples("wfs", WfsPattern); + } + private void TestSamples(string name, string pattern) { var assembly = Compiler.GetAssembly(name); @@ -464,13 +480,18 @@ private bool HandleValidationError(string[] xmlLines, ValidationEventArgs e) && !e.Message.Contains("The Pattern constraint failed")); // generator doesn't generate valid values where pattern restrictions exist, e.g. email } + private static readonly XmlQualifiedName AnyType = new XmlQualifiedName("anyType", XmlSchema.Namespace); + private void DeserializeSampleXml(string pattern, Assembly assembly) { var files = Glob.ExpandNames(pattern); var set = new XmlSchemaSet(); + var xmlSchemaReaderSettings = new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore }; + + set.XmlResolver = new XmlUrlResolver(); - var schemas = files.Select(f => XmlSchema.Read(XmlReader.Create(f), (s, e) => + var schemas = files.Select(f => XmlSchema.Read(XmlReader.Create(f, xmlSchemaReaderSettings), (s, e) => { Assert.True(false, e.Message); })); @@ -484,7 +505,11 @@ private void DeserializeSampleXml(string pattern, Assembly assembly) var anyValidXml = false; var sb = new StringBuilder(); - foreach (var rootElement in set.GlobalElements.Values.Cast().Where(e => !e.IsAbstract && !(e.ElementSchemaType is XmlSchemaSimpleType))) + + foreach (var rootElement in set.GlobalElements.Values.Cast().Where(e => + !e.IsAbstract + && !(e.ElementSchemaType is XmlSchemaSimpleType) + && e.ElementSchemaType.QualifiedName != AnyType)) { var type = FindType(assembly, rootElement.QualifiedName); var serializer = new XmlSerializer(type); diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/expr.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/expr.xsd new file mode 100644 index 00000000..bd5a7aa7 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/expr.xsd @@ -0,0 +1,33 @@ + + + + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filter.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filter.xsd new file mode 100644 index 00000000..22c436d3 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filter.xsd @@ -0,0 +1,302 @@ + + + + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterAll.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterAll.xsd new file mode 100644 index 00000000..5f5acce5 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterAll.xsd @@ -0,0 +1,17 @@ + + + + + This XML Schema document includes and imports, directly or indirectly, + all the XML Schema defined by the Filter Encoding Standard. + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterCapabilities.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterCapabilities.xsd new file mode 100644 index 00000000..70776c73 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/filterCapabilities.xsd @@ -0,0 +1,240 @@ + + + + + This XML Schema defines OGC query filter capabilities documents. + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/query.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/query.xsd new file mode 100644 index 00000000..16ae8ca1 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/query.xsd @@ -0,0 +1,57 @@ + + + + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/sort.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/sort.xsd new file mode 100644 index 00000000..6a2b1197 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/filter/2.0/sort.xsd @@ -0,0 +1,40 @@ + + + + + Filter Encoding is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/ows19115subset.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/ows19115subset.xsd new file mode 100644 index 00000000..d0dc7c41 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/ows19115subset.xsd @@ -0,0 +1,227 @@ + + + ows19115subset.xsd + This XML Schema Document encodes the parts of ISO 19115 used by the common "ServiceIdentification" and "ServiceProvider" sections of the GetCapabilities operation response, known as the service metadata XML document. The parts encoded here are the MD_Keywords, CI_ResponsibleParty, and related classes. The UML package prefixes were omitted from XML names, and the XML element names were all capitalized, for consistency with other OWS Schemas. This document also provides a simple coding of text in multiple languages, simplified from Annex J of ISO 19115. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + Text string with the language of the string identified as recommended in the XML 1.0 W3C Recommendation, section 2.12. + + + + + + + + + + + Title of this resource, normally used for display to a human. + + + + + + Brief narrative description of this resource, normally used for display to a human. + + + + + + + + Unordered list of one or more commonly used or formalised word(s) or phrase(s) used to describe the subject. When needed, the optional "type" can name the type of the associated list of keywords that shall all have the same type. Also when needed, the codeSpace attribute of that "type" can reference the type name authority and/or thesaurus. + If the xml:lang attribute is not included in a Keyword element, then no language is specified for that element unless specified by another means. All Keyword elements in the same Keywords element that share the same xml:lang attribute value represent different keywords in that language. + For OWS use, the optional thesaurusName element was omitted as being complex information that could be referenced by the codeSpace attribute of the Type element. + + + + + + + + + + Name or code with an (optional) authority. If the codeSpace attribute is present, its value shall reference a dictionary, thesaurus, or authority for the name or code, such as the organisation who assigned the value, or the dictionary from which it is taken. + Type copied from basicTypes.xsd of GML 3 with documentation edited, for possible use outside the ServiceIdentification section of a service metadata document. + + + + + + + + + + + Identification of, and means of communication with, person(s) responsible for the resource(s). + For OWS use in the ServiceProvider section of a service metadata document, the optional organizationName element was removed, since this type is always used with the ProviderName element which provides that information. The optional individualName element was made mandatory, since either the organizationName or individualName element is mandatory. The mandatory "role" element was changed to optional, since no clear use of this information is known in the ServiceProvider section. + + + + + + Identification of, and means of communication with, person responsible for the server. At least one of IndividualName, OrganisationName, or PositionName shall be included. + + + + + + + + + + + + + + Identification of, and means of communication with, person responsible for the server. + For OWS use in the ServiceProvider section of a service metadata document, the optional organizationName element was removed, since this type is always used with the ProviderName element which provides that information. The mandatory "role" element was changed to optional, since no clear use of this information is known in the ServiceProvider section. + + + + + + + + + + + + Name of the responsible person: surname, given name, title separated by a delimiter. + + + + + + Name of the responsible organization. + + + + + + Role or position of the responsible person. + + + + + + Function performed by the responsible party. Possible values of this Role shall include the values and the meanings listed in Subclause B.5.5 of ISO 19115:2003. + + + + + + Address of the responsible party. + + + + + + Information required to enable contact with the responsible person and/or organization. + For OWS use in the service metadata document, the optional hoursOfService and contactInstructions elements were retained, as possibly being useful in the ServiceProvider section. + + + + + Telephone numbers at which the organization or individual may be contacted. + + + + + Physical and email address at which the organization or individual may be contacted. + + + + + On-line information that can be used to contact the individual or organization. OWS specifics: The xlink:href attribute in the xlink:simpleAttrs attribute group shall be used to reference this resource. Whenever practical, the xlink:href attribute with type anyURI should be a URL from which more contact information can be electronically retrieved. The xlink:title attribute with type "string" can be used to name this set of information. The other attributes in the xlink:simpleAttrs attribute group should not be used. + + + + + Time period (including time zone) when individuals can contact the organization or individual. + + + + + Supplemental instructions on how or when to contact the individual or organization. + + + + + + + + Reference to on-line resource from which data can be obtained. + For OWS use in the service metadata document, the CI_OnlineResource class was XML encoded as the attributeGroup "xlink:simpleAttrs", as used in GML. + + + + + + + Telephone numbers for contacting the responsible individual or organization. + + + + + Telephone number by which individuals can speak to the responsible organization or individual. + + + + + Telephone number of a facsimile machine for the responsible +organization or individual. + + + + + + + + Location of the responsible individual or organization. + + + + + Address line for the location. + + + + + City of the location. + + + + + State or province of the location. + + + + + ZIP or other postal code. + + + + + Country of the physical address. + + + + + Address of the electronic mailbox of the responsible organization or individual. + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsAll.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsAll.xsd new file mode 100644 index 00000000..ac6d3ff8 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsAll.xsd @@ -0,0 +1,17 @@ + + + owsAll.xsd + This XML Schema Document includes and imports, directly and indirectly, all the XML Schemas defined by the OWS Common Implemetation Specification. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsCommon.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsCommon.xsd new file mode 100644 index 00000000..bdc860a2 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsCommon.xsd @@ -0,0 +1,149 @@ + + + owsCommon.xsd + This XML Schema Document encodes various parameters and parameter types that can be used in OWS operation requests and responses. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + XML encoded identifier of a standard MIME type, possibly a parameterized MIME type. + + + + + + + + + Specification version for OWS operation. The string value shall contain one x.y.z "version" value (e.g., "2.1.3"). A version number shall contain three non-negative integers separated by decimal points, in the form "x.y.z". The integers y and z shall not exceed 99. Each version shall be for the Implementation Specification (document) and the associated XML Schemas to which requested operations will conform. An Implementation Specification version normally specifies XML Schemas against which an XML encoded operation response must conform and should be validated. See Version negotiation subclause for more information. + + + + + + + + + + + This element either references or contains more metadata about the element that includes this element. To reference metadata stored remotely, at least the xlinks:href attribute in xlink:simpleAttrs shall be included. Either at least one of the attributes in xlink:simpleAttrs or a substitute for the AbstractMetaData element shall be included, but not both. An Implementation Specification can restrict the contents of this element to always be a reference or always contain metadata. (Informative: This element was adapted from the metaDataProperty element in GML 3.0.) + + + + + + + Reference to metadata recorded elsewhere, either external to this XML document or within it. Whenever practical, the xlink:href attribute with type anyURI should include a URL from which this metadata can be electronically retrieved. + + + + + Optional reference to the aspect of the element which includes this "metadata" element that this metadata provides more information about. + + + + + + + Abstract element containing more metadata about the element that includes the containing "metadata" element. A specific server implementation, or an Implementation Specification, can define concrete elements in the AbstractMetaData substitution group. + + + + + + + + + XML encoded minimum rectangular bounding box (or region) parameter, surrounding all the associated data. + This type is adapted from the EnvelopeType of GML 3.1, with modified contents and documentation for encoding a MINIMUM size box SURROUNDING all associated data. + + + + + Position of the bounding box corner at which the value of each coordinate normally is the algebraic minimum within this bounding box. In some cases, this position is normally displayed at the top, such as the top left for some image coordinates. For more information, see Subclauses 10.2.5 and C.13. + + + + + Position of the bounding box corner at which the value of each coordinate normally is the algebraic maximum within this bounding box. In some cases, this position is normally displayed at the bottom, such as the bottom right for some image coordinates. For more information, see Subclauses 10.2.5 and C.13. + + + + + + Usually references the definition of a CRS, as specified in [OGC Topic 2]. Such a CRS definition can be XML encoded using the gml:CoordinateReferenceSystemType in [GML 3.1]. For well known references, it is not required that a CRS definition exist at the location the URI points to. If no anyURI value is included, the applicable CRS must be either: +a) Specified outside the bounding box, but inside a data structure that includes this bounding box, as specified for a specific OWS use of this bounding box type. +b) Fixed and specified in the Implementation Specification for a specific OWS use of the bounding box type. + + + + + The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here. + + + + + + + Position instances hold the coordinates of a position in a coordinate reference system (CRS) referenced by the related "crs" attribute or elsewhere. For an angular coordinate axis that is physically continuous for multiple revolutions, but whose recorded values can be discontinuous, special conditions apply when the bounding box is continuous across the value discontinuity: +a) If the bounding box is continuous clear around this angular axis, then ordinate values of minus and plus infinity shall be used. +b) If the bounding box is continuous across the value discontinuity but is not continuous clear around this angular axis, then some non-normal value can be used if specified for a specific OWS use of the BoundingBoxType. For more information, see Subclauses 10.2.5 and C.13. + This type is adapted from DirectPositionType and doubleList of GML 3.1. The adaptations include omission of all the attributes, since the needed information is included in the BoundingBoxType. + + + + + + + + + XML encoded minimum rectangular bounding box (or region) parameter, surrounding all the associated data. This box is specialized for use with the 2D WGS 84 coordinate reference system with decimal values of longitude and latitude. + This type is adapted from the general BoundingBoxType, with modified contents and documentation for use with the 2D WGS 84 coordinate reference system. + + + + + + + Position of the bounding box corner at which the values of longitude and latitude normally are the algebraic minimums within this bounding box. For more information, see Subclauses 10.4.5 and C.13. + + + + + Position of the bounding box corner at which the values of longitude and latitude normally are the algebraic minimums within this bounding box. For more information, see Subclauses 10.4.5 and C.13. + + + + + + This attribute can be included when considered useful. When included, this attribute shall reference the 2D WGS 84 coordinate reference system with longitude before latitude and decimal values of longitude and latitude. + + + + + The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here. + + + + + + + + + Two-dimensional position instances hold the longitude and latitude coordinates of a position in the 2D WGS 84 coordinate reference system. The longitude value shall be listed first, followed by the latitude value, both in decimal degrees. Latitude values shall range from -90 to +90 degrees, and longitude values shall normally range from -180 to +180 degrees. For the longitude axis, special conditions apply when the bounding box is continuous across the +/- 180 degrees meridian longitude value discontinuity: +a) If the bounding box is continuous clear around the Earth, then longitude values of minus and plus infinity shall be used. +b) If the bounding box is continuous across the value discontinuity but is not continuous clear around the Earth, then some non-normal value can be used if specified for a specific OWS use of the WGS84BoundingBoxType. For more information, see Subclauses 10.4.5 and C.13. + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsContents.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsContents.xsd new file mode 100644 index 00000000..ee7fe93b --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsContents.xsd @@ -0,0 +1,78 @@ + + + owsContents.xsd + This XML Schema Document encodes the typical Contents section of an OWS service metadata (Capabilities) document. This Schema can be built upon to define the Contents section for a specific OWS. If the ContentsBaseType in this XML Schema cannot be restricted and extended to define the Contents section for a specific OWS, all other relevant parts defined in owsContents.xsd shall be used by the "ContentsType" in the wxsContents.xsd prepared for the specific OWS. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + Contents of typical Contents section of an OWS service metadata (Capabilities) document. This type shall be extended and/or restricted if needed for specific OWS use to include the specific metadata needed. + + + + + Unordered set of summary descriptions for the datasets available from this OWS server. This set shall be included unless another source is referenced and all this metadata is available from that source. + + + + + Unordered set of references to other sources of metadata describing the coverage offerings available from this server. + + + + + + + + Reference to a source of metadata describing coverage offerings available from this server. This parameter can reference a catalogue server from which dataset metadata is available. This ability is expected to be used by servers with thousands or millions of datasets, for which searching a catalogue is more feasible than fetching a long Capabilities XML document. When no DatasetDescriptionSummaries are included, and one or more catalogue servers are referenced, this set of catalogues shall contain current metadata summaries for all the datasets currently available from this OWS server, with the metadata for each such dataset referencing this OWS server. + + + + + + + + Typical dataset metadata in typical Contents section of an OWS service metadata (Capabilities) document. This type shall be extended and/or restricted if needed for specific OWS use, to include the specific Dataset description metadata needed. + + + + + + + Unordered list of zero or more minimum bounding rectangles surrounding coverage data, using the WGS 84 CRS with decimal degrees and longitude before latitude. If no WGS 84 bounding box is recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall apply to this coverage. If WGS 84 bounding box(es) are recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall be ignored. For each lowest-level coverage in a hierarchy, at least one applicable WGS84BoundingBox shall be either recorded or inherited, to simplify searching for datasets that might overlap a specified region. If multiple WGS 84 bounding boxes are included, this shall be interpreted as the union of the areas of these bounding boxes. + + + + + Unambiguous identifier or name of this coverage, unique for this server. + + + + + Unordered list of zero or more minimum bounding rectangles surrounding coverage data, in AvailableCRSs. Zero or more BoundingBoxes are allowed in addition to one or more WGS84BoundingBoxes to allow more precise specification of the Dataset area in AvailableCRSs. These Bounding Boxes shall not use any CRS not listed as an AvailableCRS. However, an AvailableCRS can be listed without a corresponding Bounding Box. If no such bounding box is recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall apply to this coverage. If such bounding box(es) are recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall be ignored. If multiple bounding boxes are included with the same CRS, this shall be interpreted as the union of the areas of these bounding boxes. + + + + + Optional unordered list of additional metadata about this dataset. A list of optional metadata elements for this dataset description could be specified in the Implementation Specification for this service. + + + + + Metadata describing zero or more unordered subsidiary datasets available from this server. + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDataIdentification.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDataIdentification.xsd new file mode 100644 index 00000000..e2eb68ef --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDataIdentification.xsd @@ -0,0 +1,115 @@ + + + owsDataIdentification.xsd + This XML Schema Document encodes the parts of the MD_DataIdentification class of ISO 19115 (OGC Abstract Specification Topic 11) which are expected to be used for most datasets. This Schema also encodes the parts of this class that are expected to be useful for other metadata. Both may be used within the Contents section of OWS service metadata (Capabilities) documents. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + Human-readable descriptive information for the object it is included within. +This type shall be extended if needed for specific OWS use to include additional metadata for each type of information. This type shall not be restricted for a specific OWS to change the multiplicity (or optionality) of some elements. + If the xml:lang attribute is not included in a Title, Abstract or Keyword element, then no language is specified for that element unless specified by another means. All Title, Abstract and Keyword elements in the same Description that share the same xml:lang attribute value represent the description of the parent object in that language. Multiple Title or Abstract elements shall not exist in the same Description with the same xml:lang attribute value unless otherwise specified. + + + + + + + + + + + Basic metadata identifying and describing a set of data. + + + + + + + Optional unique identifier or name of this dataset. + + + + + Optional unordered list of additional metadata about this data(set). A list of optional metadata elements for this data identification could be specified in the Implementation Specification for this service. + + + + + + + + + + Extended metadata identifying and describing a set of data. This type shall be extended if needed for each specific OWS to include additional metadata for each type of dataset. If needed, this type should first be restricted for each specific OWS to change the multiplicity (or optionality) of some elements. + + + + + + + Unordered list of zero or more bounding boxes whose union describes the extent of this dataset. + + + + + Unordered list of zero or more references to data formats supported for server outputs. + + + + + Unordered list of zero or more available coordinate reference systems. + + + + + + + + + + Unique identifier or name of this dataset. + + + + + + Reference to a format in which this data can be encoded and transferred. More specific parameter names should be used by specific OWS specifications wherever applicable. More than one such parameter can be included for different purposes. + + + + + + + Coordinate reference system in which data from this data(set) or resource is available or supported. More specific parameter names should be used by specific OWS specifications wherever applicable. More than one such parameter can be included for different purposes. + + + + + + Access constraint applied to assure the protection of privacy or intellectual property, or any other restrictions on retrieving or using data from or otherwise using this server. The reserved value NONE (case insensitive) shall be used to mean no access constraints are imposed. + + + + + + Fees and terms for retrieving data from or otherwise using this server, including the monetary units as specified in ISO 4217. The reserved value NONE (case insensitive) shall be used to mean no fees or terms. + + + + + + Identifier of a language used by the data(set) contents. This language identifier shall be as specified in IETF RFC 4646. When this element is omitted, the language used is not identified. + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDomainType.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDomainType.xsd new file mode 100644 index 00000000..c862610c --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsDomainType.xsd @@ -0,0 +1,271 @@ + + + owsDomainType.xsd + This XML Schema Document encodes the allowed values (or domain) of a quantity, often for an input or output parameter to an OWS. Such a parameter is sometimes called a variable, quantity, literal, or typed literal. Such a parameter can use one of many data types, including double, integer, boolean, string, or URI. The allowed values can also be encoded for a quantity that is not explicit or not transferred, but is constrained by a server implementation. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + Valid domain (or allowed set of values) of one quantity, with its name or identifier. + + + + + + Name or identifier of this quantity. + + + + + + + + + Valid domain (or allowed set of values) of one quantity, with needed metadata but without a quantity name or identifier. + + + + + + Optional default value for this quantity, which should be included when this quantity has a default value. + + + + + Meaning metadata should be referenced or included for each quantity. + + + + + This data type metadata should be referenced or included for each quantity. + + + + + Unit of measure, which should be included when this set of PossibleValues has units or a more complete reference system. + + + + + Optional unordered list of other metadata about this quantity. A list of required and optional other metadata elements for this quantity should be specified in the Implementation Specification for this service. + + + + + + + + Specifies the possible values of this quantity. + + + + + + + + + + + + Specifies that any value is allowed for this parameter. + + + + + + + Specifies that no values are allowed for this parameter or quantity. + + + + + + + Reference to externally specified list of all the valid values and/or ranges of values for this quantity. (Informative: This element was simplified from the metaDataProperty element in GML 3.0.) + + + + + + Human-readable name of the list of values provided by the referenced document. Can be empty string when this list has no name. + + + + + + + + + + + Indicates that this quantity has units or a reference system, and identifies the unit or reference system used by the AllowedValues or ValuesReference. + + + + + Identifier of unit of measure of this set of values. Should be included then this set of values has units (and not a more complete reference system). + + + + + Identifier of reference system used by this set of values. Should be included then this set of values has a reference system (not just units). + + + + + + + + + List of all the valid values and/or ranges of values for this quantity. For numeric quantities, signed values should be ordered from negative infinity to positive infinity. + + + + + + + + + + + + + + A single value, encoded as a string. This type can be used for one value, for a spacing between allowed values, or for the default value of a parameter. + + + + + + + + + The default value for a quantity for which multiple values are allowed. + + + + + + + + A range of values of a numeric parameter. This range can be continuous or discrete, defined by a fixed spacing between adjacent valid values. If the MinimumValue or MaximumValue is not included, there is no value limit in that direction. Inclusion of the specified minimum and maximum values in the range shall be defined by the rangeClosure. + + + + + + + Shall be included when the allowed values are NOT continuous in this range. Shall not be included when the allowed values are continuous in this range. + + + + + + Shall be included unless the default value applies. + + + + + + + Minimum value of this numeric parameter. + + + + + + Maximum value of this numeric parameter. + + + + + + The regular distance or spacing between the allowed values in a range. + + + + + + Specifies which of the minimum and maximum values are included in the range. Note that plus and minus infinity are considered closed bounds. + + + + + + The specified minimum and maximum values are included in this range. + + + + + The specified minimum and maximum values are NOT included in this range. + + + + + The specified minimum value is NOT included in this range, and the specified maximum value IS included in this range. + + + + + The specified minimum value IS included in this range, and the specified maximum value is NOT included in this range. + + + + + + + + + + References metadata about a quantity, and provides a name for this metadata. (Informative: This element was simplified from the metaDataProperty element in GML 3.0.) + + + + + Human-readable name of the metadata described by associated referenced document. + + + + + + + + + Reference to data or metadata recorded elsewhere, either external to this XML document or within it. Whenever practical, this attribute should be a URL from which this metadata can be electronically retrieved. Alternately, this attribute can reference a URN for well-known metadata. For example, such a URN could be a URN defined in the "ogc" URN namespace. + + + + + + Definition of the meaning or semantics of this set of values. This Meaning can provide more specific, complete, precise, machine accessible, and machine understandable semantics about this quantity, relative to other available semantic information. For example, other semantic information is often provided in "documentation" elements in XML Schemas or "description" elements in GML objects. + + + + + + Definition of the data type of this set of values. In this case, the xlink:href attribute can reference a URN for a well-known data type. For example, such a URN could be a data type identification URN defined in the "ogc" URN namespace. + + + + + + Definition of the reference system used by this set of values, including the unit of measure whenever applicable (as is normal). In this case, the xlink:href attribute can reference a URN for a well-known reference system, such as for a coordinate reference system (CRS). For example, such a URN could be a CRS identification URN defined in the "ogc" URN namespace. + + + + + + Definition of the unit of measure of this set of values. In this case, the xlink:href attribute can reference a URN for a well-known unit of measure (uom). For example, such a URN could be a UOM identification URN defined in the "ogc" URN namespace. + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd new file mode 100644 index 00000000..5c9f3904 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd @@ -0,0 +1,69 @@ + + + owsExceptionReport.xsd + This XML Schema Document encodes the Exception Report response to all OWS operations. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + Report message returned to the client that requested any OWS operation when the server detects an error while processing that operation request. + + + + + + Unordered list of one or more Exception elements that each describes an error. These Exception elements shall be interpreted by clients as being independent of one another (not hierarchical). + + + + + + Specification version for OWS operation. The string value shall contain one x.y.z "version" value (e.g., "2.1.3"). A version number shall contain three non-negative integers separated by decimal points, in the form "x.y.z". The integers y and z shall not exceed 99. Each version shall be for the Implementation Specification (document) and the associated XML Schemas to which requested operations will conform. An Implementation Specification version normally specifies XML Schemas against which an XML encoded operation response must conform and should be validated. See Version negotiation subclause for more information. + + + + + + + + + + Identifier of the language used by all included exception text values. These language identifiers shall be as specified in IETF RFC 4646. When this attribute is omitted, the language used is not identified. + + + + + + + + + + An Exception element describes one detected error that a server chooses to convey to the client. + + + + + Ordered sequence of text strings that describe this specific exception or error. The contents of these strings are left open to definition by each server implementation. A server is strongly encouraged to include at least one ExceptionText value, to provide more information about the detected error than provided by the exceptionCode. When included, multiple ExceptionText values shall provide hierarchical information about one detected error, with the most significant information listed first. + + + + + + A code representing the type of this exception, which shall be selected from a set of exceptionCode values specified for the specific service operation and server. + + + + + When included, this locator shall indicate to the client where an exception was encountered in servicing the client's operation request. This locator should be included whenever meaningful information can be provided by the server. The contents of this locator will depend on the specific exceptionCode and OWS service, and shall be specified in the OWS Implementation Specification. + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetCapabilities.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetCapabilities.xsd new file mode 100644 index 00000000..af848d2e --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetCapabilities.xsd @@ -0,0 +1,105 @@ + + + owsGetCapabilities.xsd + This XML Schema Document defines the GetCapabilities operation request and response XML elements and types, which are common to all OWSs. This XML Schema shall be edited by each OWS, for example, to specify a specific value for the "service" attribute. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + XML encoded GetCapabilities operation response. This document provides clients with service metadata about a specific service instance, usually including metadata about the tightly-coupled data served. If the server does not implement the updateSequence parameter, the server shall always return the complete Capabilities document, without the updateSequence parameter. When the server implements the updateSequence parameter and the GetCapabilities operation request included the updateSequence parameter with the current value, the server shall return this element with only the "version" and "updateSequence" attributes. Otherwise, all optional elements shall be included or not depending on the actual value of the Contents parameter in the GetCapabilities operation request. This base type shall be extended by each specific OWS to include the additional contents needed. + + + + + + + + + + Service metadata document version, having values that are "increased" whenever any change is made in service metadata document. Values are selected by each server, and are always opaque to clients. When not supported by server, server shall not return this attribute. + + + + + + + + + XML encoded GetCapabilities operation request. This operation allows clients to retrieve service metadata about a specific service instance. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. This base type shall be extended by each specific OWS to include the additional required "service" attribute, with the correct value for that OWS. + + + + + When omitted, server shall return latest supported version. + + + + + When omitted or not supported by server, server shall return complete service metadata (Capabilities) document. + + + + + When omitted or not supported by server, server shall return service metadata document using the MIME type "text/xml". + + + + + + When omitted or not supported by server, server shall return latest complete service metadata document. + + + + + + + + Service type identifier, where the string value is the OWS type abbreviation, such as "WMS" or "WFS". + + + + + + + Prioritized sequence of one or more specification versions accepted by client, with preferred versions listed first. See Version negotiation subclause for more information. + + + + + + + + + Unordered list of zero or more names of requested sections in complete service metadata document. Each Section value shall contain an allowed section name as specified by each OWS specification. See Sections parameter subclause for more information. + + + + + + + + + Service metadata document version, having values that are "increased" whenever any change is made in service metadata document. Values are selected by each server, and are always opaque to clients. See updateSequence parameter use subclause for more information. + + + + + + + Prioritized sequence of zero or more GetCapabilities operation response formats desired by client, with preferred formats listed first. Each response format shall be identified by its MIME type. See AcceptFormats parameter use subclause for more information. + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetResourceByID.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetResourceByID.xsd new file mode 100644 index 00000000..a6fca345 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsGetResourceByID.xsd @@ -0,0 +1,44 @@ + + + owsGetResourceByID.xsd + This XML Schema Document encodes the GetResourceByID operation request message. This typical operation is specified as a base for profiling in specific OWS specifications. For information on the allowed changes and limitations in such profiling, see Subclause 9.4.1 of the OWS Common specification. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + XML encoded GetResourceByID operation response. The complexType used by this element shall be specified by each specific OWS. + + + + + + + + Request to a service to perform the GetResourceByID operation. This operation allows a client to retrieve one or more identified resources, including datasets and resources that describe datasets or parameters. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. + + + + + Unordered list of zero or more resource identifiers. These identifiers can be listed in the Contents section of the service metadata (Capabilities) document. For more information on this parameter, see Subclause 9.4.2.1 of the OWS Common specification. + + + + + Optional reference to the data format to be used for response to this operation request. This element shall be included when multiple output formats are available for the selected resource(s), and the client desires a format other than the specified default, if any. + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsInputOutputData.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsInputOutputData.xsd new file mode 100644 index 00000000..29d32acc --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsInputOutputData.xsd @@ -0,0 +1,52 @@ + + + owsInputOutputData.xsd + This XML Schema Document specifies types and elements for input and output of operation data, allowing including multiple data items with each data item either included or referenced. The contents of each type and element specified here can be restricted and/or extended for each use in a specific OWS specification. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + Response from an OWS operation, allowing including multiple output data items with each item either included or referenced. This OperationResponse element, or an element using the ManifestType with a more specific element name, shall be used whenever applicable for responses from OWS operations. + This element is specified for use where the ManifestType contents are needed for an operation response, but the Manifest element name is not fully applicable. This element or the ManifestType shall be used instead of using the ows:ReferenceType proposed in OGC 04-105. + + + + + + Input data in a XML-encoded OWS operation request, allowing including multiple data items with each data item either included or referenced. This InputData element, or an element using the ManifestType with a more-specific element name (TBR), shall be used whenever applicable within XML-encoded OWS operation requests. + + + + + + + + Complete reference to a remote resource that needs to be retrieved from an OWS using an XML-encoded operation request. This element shall be used, within an InputData or Manifest element that is used for input data, when that input data needs to be retrieved from another web service using a XML-encoded OWS operation request. This element shall not be used for local payload input data or for requesting the resource from a web server using HTTP Get. + + + + + + + The XML-encoded operation request message to be sent to request this input data from another web server using HTTP Post. + + + + + Reference to the XML-encoded operation request message to be sent to request this input data from another web server using HTTP Post. The referenced message shall be attached to the same message (using the cid scheme), or be accessible using a URL. + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsManifest.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsManifest.xsd new file mode 100644 index 00000000..9edbee9c --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsManifest.xsd @@ -0,0 +1,116 @@ + + + owsManifest.xsd + This XML Schema Document specifies types and elements for document or resource references and for package manifests that contain multiple references. The contents of each type and element specified here can be restricted and/or extended for each use in a specific OWS specification. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + Base for a reference to a remote or local resource. + This type contains only a restricted and annotated set of the attributes from the xlink:simpleAttrs attributeGroup. + + + + + Reference to a remote resource or local payload. A remote resource is typically addressed by a URL. For a local payload (such as a multipart mime message), the xlink:href must start with the prefix cid:. + + + + + Reference to a resource that describes the role of this reference. When no value is supplied, no particular role value is to be inferred. + + + + + Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. + + + + + Describes the meaning of the referenced resource in a human-readable fashion. + + + + + Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. + + + + + Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. + + + + + + + + + Complete reference to a remote or local resource, allowing including metadata about that resource. + + + + + + + Optional unique identifier of the referenced resource. + + + + + + The format of the referenced resource. This element is omitted when the mime type is indicated in the http header of the reference. + + + + + Optional unordered list of additional metadata about this resource. A list of optional metadata elements for this ReferenceType could be specified in the Implementation Specification for each use of this type in a specific OWS. + + + + + + + + + + + + + Logical group of one or more references to remote and/or local resources, allowing including metadata about that group. A Group can be used instead of a Manifest that can only contain one group. + + + + + + + + + + + + + + + Unordered list of one or more groups of references to remote and/or local resources. + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsOperationsMetadata.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsOperationsMetadata.xsd new file mode 100644 index 00000000..dcdbd3b6 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsOperationsMetadata.xsd @@ -0,0 +1,133 @@ + + + owsOperationsMetadata.xsd + This XML Schema Document encodes the basic contents of the "OperationsMetadata" section of the GetCapabilities operation response, also known as the Capabilities XML document. + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + Metadata about the operations and related abilities specified by this service and implemented by this server, including the URLs for operation requests. The basic contents of this section shall be the same for all OWS types, but individual services can add elements and/or change the optionality of optional elements. + + + + + + Metadata for unordered list of all the (requests for) operations that this server interface implements. The list of required and optional operations implemented shall be specified in the Implementation Specification for this service. + + + + + Optional unordered list of parameter valid domains that each apply to one or more operations which this server interface implements. The list of required and optional parameter domain limitations shall be specified in the Implementation Specification for this service. + + + + + Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this server. The list of required and optional constraints shall be specified in the Implementation Specification for this service. + + + + + + + + + + Individual software vendors and servers can use this element to provide metadata about any additional server abilities. + + + + + + Metadata for one operation that this server implements. + + + + + + Unordered list of Distributed Computing Platforms (DCPs) supported for this operation. At present, only the HTTP DCP is defined, so this element will appear only once. + + + + + Optional unordered list of parameter domains that each apply to this operation which this server implements. If one of these Parameter elements has the same "name" attribute as a Parameter element in the OperationsMetadata element, this Parameter element shall override the other one for this operation. The list of required and optional parameter domain limitations for this operation shall be specified in the Implementation Specification for this service. + + + + + Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this operation. If one of these Constraint elements has the same "name" attribute as a Constraint element in the OperationsMetadata element, this Constraint element shall override the other one for this operation. The list of required and optional constraints for this operation shall be specified in the Implementation Specification for this service. + + + + + Optional unordered list of additional metadata about this operation and its' implementation. A list of required and optional metadata elements for this operation should be specified in the Implementation Specification for this service. (Informative: This metadata might specify the operation request parameters or provide the XML Schemas for the operation request.) + + + + + + Name or identifier of this operation (request) (for example, GetCapabilities). The list of required and optional operations implemented shall be specified in the Implementation Specification for this service. + + + + + + + + Information for one distributed Computing Platform (DCP) supported for this operation. At present, only the HTTP DCP is defined, so this element only includes the HTTP element. + + + + + + + + + + + + Connect point URLs for the HTTP Distributed Computing Platform (DCP). Normally, only one Get and/or one Post is included in this element. More than one Get and/or Post is allowed to support including alternative URLs for uses such as load balancing or backup. + + + + + + Connect point URL prefix and any constraints for the HTTP "Get" request method for this operation request. + + + + + Connect point URL and any constraints for the HTTP "Post" request method for this operation request. + + + + + + + + + Connect point URL and any constraints for this HTTP request method for this operation request. In the OnlineResourceType, the xlink:href attribute in the xlink:simpleAttrs attribute group shall be used to contain this URL. The other attributes in the xlink:simpleAttrs attribute group should not be used. + + + + + + + Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this request method for this operation. If one of these Constraint elements has the same "name" attribute as a Constraint element in the OperationsMetadata or Operation element, this Constraint element shall override the other one for this operation. The list of required and optional constraints for this request method for this operation shall be specified in the Implementation Specification for this service. + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceIdentification.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceIdentification.xsd new file mode 100644 index 00000000..2e77e021 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceIdentification.xsd @@ -0,0 +1,53 @@ + + + owsServiceIdentification.xsd + This XML Schema Document encodes the common "ServiceIdentification" section of the GetCapabilities operation response, known as the Capabilities XML document. This section encodes the SV_ServiceIdentification class of ISO 19119 (OGC Abstract Specification Topic 12). + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + General metadata for this specific server. This XML Schema of this section shall be the same for all OWS. + + + + + + + + A service type name from a registry of services. For example, the values of the codeSpace URI and name and code string may be "OGC" and "catalogue." This type name is normally used for machine-to-machine communication. + + + + + Unordered list of one or more versions of this service type implemented by this server. This information is not adequate for version negotiation, and shall not be used for that purpose. + + + + + Unordered list of identifiers of Application Profiles that are implemented by this server. This element should be included for each specified application profile implemented by this server. The identifier value should be specified by each Application Profile. If this element is omitted, no meaning is implied. + + + + + If this element is omitted, no meaning is implied. + + + + + Unordered list of access constraints applied to assure the protection of privacy or intellectual property, and any other restrictions on retrieving or using data from or otherwise using this server. The reserved value NONE (case insensitive) shall be used to mean no access constraints are imposed. When this element is omitted, no meaning is implied. + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceProvider.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceProvider.xsd new file mode 100644 index 00000000..90cabbaa --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/ows/1.1.0/owsServiceProvider.xsd @@ -0,0 +1,39 @@ + + + owsServiceProvider.xsd + This XML Schema Document encodes the common "ServiceProvider" section of the GetCapabilities operation response, known as the Capabilities XML document. This section encodes the SV_ServiceProvider class of ISO 19119 (OGC Abstract Specification Topic 12). + + OWS is an OGC Standard. + Copyright (c) 2006,2010 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + Metadata about the organization that provides this specific service instance or server. + + + + + + A unique identifier for the service provider organization. + + + + + Reference to the most relevant web site of the service provider. + + + + + Information for contacting the service provider. The OnlineResource element within this ServiceContact element should not be used to reference a web site of the service provider. + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/wfs/2.0/wfs.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/wfs/2.0/wfs.xsd new file mode 100644 index 00000000..04e794f0 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/schemas.opengis.net/wfs/2.0/wfs.xsd @@ -0,0 +1,701 @@ + + + This XML Schema Document includes and imports, + directly or indirectly, all the XML Schemas defined by the + Web Feature Service (WFS) Implementation Specification. + + WFS is an OGC Standard. + Copyright (c) 2010, 2014 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/1999/xlink.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/1999/xlink.xsd new file mode 100644 index 00000000..98adc9a7 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/1999/xlink.xsd @@ -0,0 +1,269 @@ + + + + This schema document provides attribute declarations and +attribute group, complex type and simple type definitions which can be used in +the construction of user schemas to define the structure of particular linking +constructs, e.g. + +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xl="http://www.w3.org/1999/xlink"> + + <xs:import namespace="http://www.w3.org/1999/xlink" + location="http://www.w3.org/1999/xlink.xsd"> + + <xs:element name="mySimple"> + <xs:complexType> + ... + <xs:attributeGroup ref="xl:simpleAttrs"/> + ... + </xs:complexType> + </xs:element> + ... +</xs:schema> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Intended for use as the type of user-declared elements to make them + simple links. + + + + + + + + + + + + + + + + + + + + + + + + + Intended for use as the type of user-declared elements to make them + extended links. + Note that the elements referenced in the content model are all abstract. + The intention is that by simply declaring elements with these as their + substitutionGroup, all the right things will happen. + + + + + + + + + + + + + + xml:lang is not required, but provides much of the + motivation for title elements in addition to attributes, and so + is provided here for convenience. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + label is not required, but locators have no particular + XLink function if they are not labeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + from and to have default behavior when values are missing + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2001/xml.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2001/xml.xsd new file mode 100644 index 00000000..d2dda3cf --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2001/xml.xsd @@ -0,0 +1,278 @@ + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="./xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="../2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + ../2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + ./xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + ./xml.xsd + + will change accordingly; the version at + + ../2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
\ No newline at end of file diff --git a/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2009/01/xml.xsd b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2009/01/xml.xsd new file mode 100644 index 00000000..24034d23 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/wfs/www.w3.org/2009/01/xml.xsd @@ -0,0 +1,278 @@ + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="../../2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="./xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + ./xml.xsd. +

+

+ At the date of issue it can also be found at + + ../../2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + ../../2001/xml.xsd + + will change accordingly; the version at + + ./xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
\ No newline at end of file diff --git a/XmlSchemaClassGenerator/ModelBuilder.cs b/XmlSchemaClassGenerator/ModelBuilder.cs index 4990c880..77cff145 100644 --- a/XmlSchemaClassGenerator/ModelBuilder.cs +++ b/XmlSchemaClassGenerator/ModelBuilder.cs @@ -77,7 +77,7 @@ public ModelBuilder(GeneratorConfiguration configuration, XmlSchemaSet set) private void CreateSubstitutes() { - var classesProps = Types.Values.OfType().Select(c => c.Properties.Where(p => p.XmlSchemaName != null).ToList()).ToList(); + var classesProps = Types.Values.OfType().Select(c => c.Properties.ToList()).ToList(); foreach (var classProps in classesProps) { @@ -91,27 +91,30 @@ private void CreateSubstitutes() order++; } - var substitutes = GetSubstitutedElements(prop.XmlSchemaName).ToList(); - - if (_configuration.SeparateSubstitutes) + if (prop.XmlSchemaName != null) { - var elems = GetElements(prop.XmlParticle, prop.XmlParent); + var substitutes = GetSubstitutedElements(prop.XmlSchemaName).ToList(); - foreach (var substitute in substitutes) + if (_configuration.SeparateSubstitutes) { - var cls = (ClassModel)prop.OwningType; - var schema = substitute.Element.GetSchema(); - var source = CodeUtilities.CreateUri(schema.SourceUri); - var props = CreatePropertiesForElements(source, cls, prop.XmlParticle, new[] { prop.Particle }, substitute, order); + var elems = GetElements(prop.XmlParticle, prop.XmlParent); + + foreach (var substitute in substitutes) + { + var cls = (ClassModel)prop.OwningType; + var schema = substitute.Element.GetSchema(); + var source = CodeUtilities.CreateUri(schema.SourceUri); + var props = CreatePropertiesForElements(source, cls, prop.XmlParticle, new[] { prop.Particle }, substitute, order); - cls.Properties.AddRange(props); + cls.Properties.AddRange(props); - order += props.Count(); + order += props.Count(); + } + } + else + { + prop.Substitutes = substitutes; } - } - else - { - prop.Substitutes = substitutes; } } }