Use the Simple Schema Generator builder to add a schema to the model based on an XML structure.
The XML structure can be contained in a variable or returned by a method, service call, or other builder call. You can use the Simple Schema Generator builder to create a schema that allows a Data Page builder to display the data in an XML structure or whenever you want to be able to expose elements in an XML variable to the reference chooser.
Associate the Source Variable with the New Schema
Enable the Modify Variable check box to associate the source variable with the new schema. If you do not want the source variable to be associated with the schema, leave this input disabled.
Limitations of the Simple Schema Generator builder
The Simple Schema Generator builder creates a simple XML Schema from sample XML data. It is not intended to be a full schema generation solution. Use the Simple Schema Generator to create a quick, simple schema to use with another builder that may require schema information during the early development of a solution. The following limitations apply to the Simple Schema Generator builder:
- Assumes elements are made up of <sequence>s of elements and/or are XSD:string types.
- Assumes that if there is one child element, that an element is a <sequence> of child element with minimum equals 1 and maximum equals 1.
- Assumes that if there is more than one child element with a particular name that it is a <sequence> of child elements with minimum equals 1 and maximum equals unbounded.
- The target namespace specified in the builder inputs will be used in the schema, regardless of whether the sample XML data has already defined a namespace.
- No type information from the sample XML is used in the generated schema. The sample XML is assumed to be simple (containing no namespace or type information) and therefore, any such information in the sample data will be ignored.
- An element with no child elements is assumed to be of type xsd:string, as opposed to an empty element, or possibly another primitive data type.
- Child elements trigger a <sequence> to be used to describe the children. No provision is made for using <all> or <choice> instead of <sequence>.
If you require any of these features, manually design the complex schemas, and seek the help of a third party XML Schema solution to generate such schemas.
Parent topic: Builder Reference: wpf7
About using the builder call editor: wpf7
Data Page builder: wpf7
Example: simple forms: wpf7
Variable builder: wpf7