src/jdk.jfr/share/classes/jdk/jfr/internal/jfc/jfc.xsd
changeset 50113 caf115bb98ad
child 50202 63c65528b1fe
equal deleted inserted replaced
50112:7a2a740815b7 50113:caf115bb98ad
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified"
       
     3 	version="1.0">
       
     4 
       
     5 	<xsd:element name="configuration" type="configurationType" />
       
     6 
       
     7 	<xsd:complexType name="configurationType">
       
     8 		<xsd:sequence>
       
     9 			<xsd:element minOccurs="0" maxOccurs="unbounded" name="producer" type="producerType" />
       
    10 		</xsd:sequence>
       
    11 		<xsd:attribute use="required" name="version" type="xsd:decimal" />
       
    12 		<xsd:attribute use="required" name="name" type="xsd:string" />
       
    13 		<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
    14 		<xsd:attribute use="optional" name="provider" type="xsd:string" default="" />
       
    15 	</xsd:complexType>
       
    16 
       
    17 	<xsd:complexType name="producerType">
       
    18 		<xsd:sequence>
       
    19 			<xsd:element minOccurs="0" maxOccurs="1" name="control" type="controlType" />
       
    20 			<xsd:element minOccurs="0" maxOccurs="unbounded" name="event" type="eventType" />
       
    21 		</xsd:sequence>
       
    22 		<xsd:attribute use="required" name="uri" type="xsd:anyURI" />
       
    23 		<xsd:attribute use="optional" name="label" type="xsd:string" default="" />
       
    24 		<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
    25 	</xsd:complexType>
       
    26 
       
    27 	<xsd:complexType name="eventType">
       
    28 		<xsd:sequence>
       
    29 			<xsd:element minOccurs="0" maxOccurs="unbounded" name="setting" type="settingType" />
       
    30 		</xsd:sequence>
       
    31 		<xsd:attribute use="required" name="path" type="xsd:string" />
       
    32 		<xsd:attribute use="optional" name="label" type="xsd:string" />
       
    33 		<xsd:attribute use="optional" name="description" type="xsd:string" />
       
    34 	</xsd:complexType>
       
    35 
       
    36 	<xsd:simpleType name="controlIdentifier">
       
    37 		<xsd:restriction base="xsd:NMTOKEN" />
       
    38 	</xsd:simpleType>
       
    39 
       
    40 	<xsd:complexType name="settingType" mixed="true">
       
    41 		<xsd:attribute use="required" name="name" type="xsd:string" />
       
    42 		<xsd:attribute use="optional" name="control" type="xsd:anyURI" />
       
    43 	</xsd:complexType>
       
    44 
       
    45 	<!-- The elements below are ignored by the JVM -->
       
    46 
       
    47 	<xsd:complexType name="controlType">
       
    48 		<xsd:sequence minOccurs="0" maxOccurs="unbounded">
       
    49 			<xsd:choice>
       
    50 				<xsd:element name="text" type="textType" />
       
    51 				<xsd:element name="selection" type="selectionType" />
       
    52 				<xsd:element name="flag" type="flagType" />
       
    53 				<xsd:element name="condition" type="conditionType" />
       
    54 			</xsd:choice>
       
    55 		</xsd:sequence>
       
    56 	</xsd:complexType>
       
    57 
       
    58 	<!-- Content type is an optional tag (identifier) that hints how a value should be interpreted. -->
       
    59 	<xsd:simpleType name="contentType">
       
    60 		<xsd:restriction base="xsd:NMTOKEN" />
       
    61 	</xsd:simpleType>
       
    62 
       
    63 	<!-- Flag represents a boolean input that can be true or false. -->
       
    64 	<xsd:complexType name="flagType">
       
    65 		<xsd:simpleContent>
       
    66 			<xsd:extension base="xsd:string">
       
    67 				<xsd:attribute use="required" name="label" type="xsd:string" />
       
    68 				<xsd:attribute use="required" name="name" type="controlIdentifier" />
       
    69 				<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
    70 			</xsd:extension>
       
    71 		</xsd:simpleContent>
       
    72 	</xsd:complexType>
       
    73 
       
    74 	<!-- Text represents a string based input which may have a contentType that hints how the text should be interpreted. 
       
    75 	For content that can be ordered (i.e numbers) it's possible to set a minimum and maximum value. How values are 
       
    76 	ordered are determined by the contentType. For instance, if the contenType would be "timeSpan" "1 s" would 
       
    77 	larger then "1 ns". -->
       
    78 	<xsd:complexType name="textType">
       
    79 		<xsd:simpleContent>
       
    80 			<xsd:extension base="xsd:string">
       
    81 				<xsd:attribute use="required" name="label" type="xsd:string" />
       
    82 				<xsd:attribute use="required" name="name" type="controlIdentifier" />
       
    83 				<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
    84 				<xsd:attribute use="optional" name="contentType" type="contentType" default="text" />
       
    85 				<xsd:attribute use="optional" name="minimum" type="xsd:string" />
       
    86 				<xsd:attribute use="optional" name="maximum" type="xsd:string" />
       
    87 			</xsd:extension>
       
    88 		</xsd:simpleContent>
       
    89 	</xsd:complexType>
       
    90 
       
    91 	<!-- Selection represents an input from a set of values. Values are stored in the option elements and 
       
    92 	they each have unique identifier (selectionIdentfier). The default attribute should point to one of 
       
    93 	these values -->
       
    94 	<xsd:simpleType name="selectionIdentifier">
       
    95 		<xsd:restriction base="xsd:NMTOKEN" />
       
    96 	</xsd:simpleType>
       
    97 
       
    98 	<xsd:complexType name="selectionType">
       
    99 		<xsd:sequence minOccurs="1" maxOccurs="unbounded">
       
   100 			<xsd:element name="option" type="optionType" />
       
   101 		</xsd:sequence>
       
   102 		<xsd:attribute use="required" name="label" type="xsd:string" />
       
   103 		<xsd:attribute use="required" name="name" type="controlIdentifier" />
       
   104 		<xsd:attribute use="required" name="default" type="selectionIdentifier" />
       
   105 		<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
   106 	</xsd:complexType>
       
   107 
       
   108 	<xsd:complexType name="optionType">
       
   109 		<xsd:simpleContent>
       
   110 			<xsd:extension base="xsd:string">
       
   111 				<xsd:attribute use="required" name="name" type="selectionIdentifier" />
       
   112 				<xsd:attribute use="required" name="label" type="xsd:string" />
       
   113 				<xsd:attribute use="optional" name="description" type="xsd:string" default="" />
       
   114 			</xsd:extension>
       
   115 		</xsd:simpleContent>
       
   116 	</xsd:complexType>
       
   117 
       
   118 	<!--Condition represents an input that depends on other inputs. The child elements defines a 
       
   119 	boolean expression with test as leaf nodes. If the expression evaluates to true the input returns 
       
   120 	"true" and if it's false "false". It's possible to override this behavior by setting the attributes 
       
   121 	true and false to the values that should be returned. -->
       
   122 	<xsd:complexType name="conditionType">
       
   123 		<xsd:choice>
       
   124 			<xsd:element name="test" type="testType" />
       
   125 			<xsd:element name="and" type="andType" />
       
   126 			<xsd:element name="not" type="notType" />
       
   127 			<xsd:element name="or" type="orType" />
       
   128 		</xsd:choice>
       
   129 		<xsd:attribute use="required" name="name" type="xsd:string" />
       
   130 		<xsd:attribute default="true" name="true" type="xsd:string" />
       
   131 		<xsd:attribute default="false" name="false" type="xsd:string" />
       
   132 	</xsd:complexType>
       
   133 
       
   134 	<xsd:complexType name="orType">
       
   135 		<xsd:sequence minOccurs="2" maxOccurs="unbounded">
       
   136 			<xsd:choice>
       
   137 				<xsd:element name="test" type="testType" />
       
   138 				<xsd:element name="and" type="andType" />
       
   139 				<xsd:element name="not" type="notType" />
       
   140 				<xsd:element name="or" type="orType" />
       
   141 			</xsd:choice>
       
   142 		</xsd:sequence>
       
   143 	</xsd:complexType>
       
   144 
       
   145 	<xsd:complexType name="andType">
       
   146 		<xsd:sequence minOccurs="2" maxOccurs="unbounded">
       
   147 			<xsd:choice>
       
   148 				<xsd:element name="test" type="testType" />
       
   149 				<xsd:element name="and" type="andType" />
       
   150 				<xsd:element name="not" type="notType" />
       
   151 				<xsd:element name="or" type="orType" />
       
   152 			</xsd:choice>
       
   153 		</xsd:sequence>
       
   154 	</xsd:complexType>
       
   155 
       
   156 	<xsd:complexType name="notType">
       
   157 		<xsd:choice>
       
   158 			<xsd:element name="test" type="testType" />
       
   159 			<xsd:element name="and" type="andType" />
       
   160 			<xsd:element name="or" type="orType" />
       
   161 			<xsd:element name="not" type="notType" />
       
   162 		</xsd:choice>
       
   163 	</xsd:complexType>
       
   164 
       
   165 	<xsd:simpleType name="operatorType">
       
   166 		<xsd:restriction base="xsd:NMTOKEN">
       
   167 			<xsd:enumeration value="equal" />
       
   168 		</xsd:restriction>
       
   169 	</xsd:simpleType>
       
   170 
       
   171 	<xsd:complexType name="testType">
       
   172 		<xsd:attribute use="required" name="name" type="controlIdentifier" />
       
   173 		<xsd:attribute use="required" name="operator" type="operatorType" />
       
   174 		<xsd:attribute use="required" name="value" type="xsd:string" />
       
   175 		<xsd:attribute use="optional" name="contentType" type="contentType" default="text" />
       
   176 	</xsd:complexType>
       
   177 </xsd:schema>