下列「XML 綱目」是一份文件,其說明 Common Base Event 資料模型的元素和屬性宣告。這個綱目必須用來根據所定義的一組規則, 確認事件 XML 文件是有效的。
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_0"
targetNamespace="http://www.ibm.com/AC/commonbaseevent1_0" version="1.0"> <xsd:complexType name="CommonBaseEventType"> <xsd:sequence> <xsd:element name="contextDataElements" type="cbe:ContextDataElementType" minOccurs="0" maxOccurs="unbounded"> <xsd:element name="extendedDataElements" type="cbe:ExtendedDataElementType" minOccurs="0" maxOccurs="unbounded"> <xsd:element name="associatedEvents" type="cbe:AssociatedEventType" minOccurs="0" maxOccurs="unbounded"> <xsd:element name="reporterComponentId" type="cbe:ComponentIdentificationType" minOccurs="0" maxOccurs="1"> <xsd:element name="sourceComponentId" type="cbe:ComponentIdentificationType" minOccurs="1" maxOccurs="1"> <xsd:element name="msgDataElement" type="cbe:MsgDataElementType" minOccurs="0" maxOccurs="1"> <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="globalInstanceId" type="xsd:ID" use="optional"> <xsd:attribute name="extensionName" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:Name"> <xsd:maxLength value="64"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="localInstanceId" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="128"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="creationTime" type="xsd:dateTime" use="required"> <xsd:attribute name="severity" use="optional" > <xsd:simpleType> <xsd:restriction base="xsd:short"> <xsd:minInclusive value="0"> <xsd:maxInclusive value="70"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="msg" use="optional" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="1024"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="priority" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:short"> <xsd:minInclusive value="0"> <xsd:maxInclusive value="100"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="sequenceNumber" type="xsd:long" use="optional"> <xsd:attribute name="situationType" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="512"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="repeatCount" type="xsd:int" use="optional"> <xsd:attribute name="elapsedTime" type="xsd:long" use="optional"> </xsd:complexType> <xsd:element name="CommonBaseEvent" type="cbe:CommonBaseEventType" /> <xsd:complexType name="ComponentIdentificationType"> <xsd:attribute name="component" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="subComponent" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="512"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="componentIdType" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="32"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="instanceId" use="optional" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="128"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="application" use="optional"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="executionEnvironment" use="optional" > <xsd:simpleType>In general, it is 1pm <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="location" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="locationType" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:Name"> <xsd:maxLength value="32"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="processId" use="optional" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="64"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="threadId" use="optional" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="64"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> <xsd:complexType name="MsgDataElementType"> <xsd:sequence> <xsd:element name="msgCatalogTokens" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:attribute name="value" use="required" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:group ref="cbe:msgIdGroup" minOccurs="0" maxOccurs="1"/> <xsd:group ref="cbe:msgCatalogGroup" minOccurs="0" maxOccurs="1"/> </xsd:sequence> <xsd:attribute name="msgLocale" type="xsd:language" use="optional"> </xsd:attribute> </xsd:complexType> <xsd:group name="msgCatalogGroup"> <xsd:sequence> <xsd:element name="msgCatalogId" type="xsd:string" minOccurs="1" maxOccurs="1"> <xsd:element name="msgCatalogType" minOccurs="1" maxOccurs="1" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="32"> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="msgCatalog" minOccurs="1" maxOccurs="1"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="128"> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:group> <xsd:group name="msgIdGroup"> <xsd:sequence> <xsd:element name="msgId" minOccurs="1" maxOccurs="1" > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="256"> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="msgIdType" minOccurs="1" maxOccurs="1"> <xsd:simpleType> <xsd:restriction base="xsd:Name"> <xsd:maxLength value="32"> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:group> <xsd:complexType name="AssociatedEventType"> <!-- 這個關聯應包含所有 resolvedAssociatedEvent 物件的 GloballyUniqueId 序列化版本 --> <xsd:attribute name="associationEngine" type="xsd:IDREF" use="required"> <xsd:attribute name="resolvedEvents" type="xsd:IDREFS" use="required"> </xsd:complexType> <xsd:complexType name="AssociationEngineType"> <!-- 這個 id 包含所有 resolvedAssociatedEvent 物件的 GloballyUniqueId 序列化版本 --> <xsd:attribute name="id" type="xsd:ID" use="required"> <xsd:attribute name="type" type="xsd:Name" use="required"> <xsd:attribute name="name" type="xsd:Name" use="required"> </xsd:complexType> <xsd:element name="AssociationEngine" type="cbe:AssociationEngineType"> <xsd:complexType name="ExtendedDataElementType"> <xsd:choice> <xsd:element name="values" type="xsd:string" minOccurs="0" maxOccurs="unbounded"> <xsd:element name="hexValue" type="xsd:hexBinary" minOccurs="0" maxOccurs="1"> <xsd:element name="children" type="cbe:ExtendedDataElementType" minOccurs="0" maxOccurs="unbounded"> </xsd:choice> <xsd:attribute name="name" type="xsd:Name" use="required"> <xsd:attribute name="type" type="xsd:Name" use="required" /> </xsd:complexType> <xsd:complexType name="ContextDataElementType"> <xsd:choice> <xsd:element name="contextValue" type="xsd:string" minOccurs="0" maxOccurs="1"> <xsd:element name="contextId" type="xsd:IDREF" minOccurs="0" maxOccurs="1"> </xsd:choice> <xsd:attribute name="name" type="xsd:Name" use="required"> <xsd:attribute name="type" type="xsd:Name" use="required"> </xsd:complexType> <xsd:complexType name="CommonBaseEventsType"> <xsd:sequence> <xsd:element ref="cbe:AssociationEngine" minOccurs="0" maxOccurs="unbounded"> <xsd:element ref="cbe:CommonBaseEvent" minOccurs="0" maxOccurs="unbounded"> </xsd:sequence> </xsd:complexType> <xsd:element name="CommonBaseEvents" type="cbe:CommonBaseEventsType"> </xsd:schema>
(C) Copyright IBM Corporation 2000, 2003. All Rights Reserved.