Compiler Keywords That Affect the Schema
The Required keyword affects the XML schema, by removing the minOccurs="0" attribute. For example, consider the following class:
Class Schema.PropKeywords Extends (%RegisteredObject, %XML.Adaptor)
{
Parameter XMLTYPENAMESPACE="mytypes";
Property Property1 As %String;
Property Property2 As %String [ Required ];
}
If we generate a schema for the namespace used here, we see the following:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:s="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" targetNamespace="test">
<complexType name="PropKeywords">
<sequence>
<element minOccurs="0" name="Property1" type="s:string"/>
<element name="Property2" type="s:string"/>
</sequence>
</complexType>
</schema>
Note that the default for minOccurs is 1; that is, Property2 is required.
No other property keywords affect the schema for data type classes.