XSD文件,用于验证Access数据宏的XML源代码

时间:2014-11-20 19:08:05

标签: xml ms-access xsd ms-access-2010 ms-access-data-macro

在哪里可以找到我需要验证从事件驱动的数据宏复制代码时获得的XML所需的XSD文件(例如,"插入后","更新后& #34;,"在Access 2010或更高版本中删除")之后?

我通常在Notepad ++中编写XML,然后将其粘贴到Access中,但如果我可以先检查它是否合适,那就太棒了。

1 个答案:

答案 0 :(得分:1)

我在MSDN上找到了以下XSD:

<xsd:schema xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/accessservices/2009/11/application" xmlns:a="http://schemas.microsoft.com/office/accessservices/2009/11/forms" xmlns:wbld="http://schemas.microsoft.com/office/word/2004/5/build" wbld:hash="true" wbld:prefix="axl" wbld:cname="AXL" elementFormDefault="qualified" xmlns:odoc="http://schemas.microsoft.com/internal/obd">
  <xsd:import namespace="http://schemas.microsoft.com/office/accessservices/2009/11/forms" schemaLocation="formxaml.xsd"/>
  <xsd:simpleType name="ST_ObjectName">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="72"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_UserInterfaceObjectEvent">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="64"/>
      <xsd:enumeration value="OnClick" wbld:cname="OnClick"/>
      <xsd:enumeration value="OnDblClick" wbld:cname="OnDblClick"/>
      <xsd:enumeration value="AfterUpdate" wbld:cname="AfterUpdate"/>
      <xsd:enumeration value="OnChange" wbld:cname="OnChange"/>
      <xsd:enumeration value="OnCurrent" wbld:cname="OnCurrent"/>
      <xsd:enumeration value="OnLoad" wbld:cname="OnLoad"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_DataObjectEvent">
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="64"/>
      <xsd:enumeration value="AfterInsert" wbld:cname="AfterInsert"/>
      <xsd:enumeration value="AfterUpdate" wbld:cname="AfterUpdate"/>
      <xsd:enumeration value="AfterDelete" wbld:cname="AfterDelete"/>
      <xsd:enumeration value="BeforeChange" wbld:cname="BeforeChange"/>
      <xsd:enumeration value="BeforeDelete" wbld:cname="BeforeDelete"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_ShortString">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="255"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_LongString">
    <xsd:restriction base="xsd:string">
      <xsd:maxLength value="1024"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="CT_Expression" mixed="true"/>
  <xsd:simpleType name="ST_JoinDirection">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Inner" wbld:cname="Inner"/>
      <xsd:enumeration value="Left Outer" wbld:cname="LeftOuter"/>
      <xsd:enumeration value="Right Outer" wbld:cname="RightOuter"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_FieldType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Text" wbld:cname="Text"/>
      <xsd:enumeration value="Number" wbld:cname="Number"/>
      <xsd:enumeration value="Yes/No" wbld:cname="YesNo"/>
      <xsd:enumeration value="Currency" wbld:cname="Currency"/>
      <xsd:enumeration value="Date/Time" wbld:cname="DateTime"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ST_SortDirection">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Ascending" wbld:cname="Ascending"/>
      <xsd:enumeration value="Descending" wbld:cname="Descending"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="CT_Property">
    <xsd:complexContent>
      <xsd:extension base="CT_Expression">
        <xsd:attribute name="Name" type="xsd:string" use="required" wbld:cname="Name"/>
        <xsd:attribute name="Type" type="xsd:string" use="required" wbld:cname="Type"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CT_PropertyBag">
    <xsd:sequence>
      <xsd:element name="Property" maxOccurs="unbounded" wbld:cname="Property" type="CT_Property"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Order">
    <xsd:attribute name="Name" type="ST_LongString" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Source" type="ST_ObjectName" use="required" wbld:cname="Source"/>
    <xsd:attribute name="Direction" type="ST_SortDirection" default="Ascending" wbld:cname="Direction" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Ordering">
    <xsd:sequence>
      <xsd:element name="Order" maxOccurs="255" wbld:cname="Order" type="CT_Order"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_AdHocOrder">
    <xsd:attribute name="Name" type="ST_LongString" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Direction" type="ST_SortDirection" default="Ascending" wbld:cname="Direction" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_AdHocOrdering">
    <xsd:sequence>
      <xsd:element name="Order" maxOccurs="255" wbld:cname="Order" type="CT_AdHocOrder"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Reference">
    <xsd:attribute name="Source" type="ST_ObjectName" use="required" wbld:cname="Source"/>
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_References">
    <xsd:sequence>
      <xsd:element name="Reference" maxOccurs="unbounded" wbld:cname="Reference" type="CT_Reference"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Result">
    <xsd:all>
      <xsd:element name="Expression" type="CT_Expression" minOccurs="0" wbld:cname="Expression"/>
    </xsd:all>
    <xsd:attribute name="Source" type="ST_ObjectName" wbld:cname="Source" use="optional"/>
    <xsd:attribute name="Name" type="ST_LongString" wbld:cname="Name" use="optional"/>
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
    <xsd:attribute name="All" type="xsd:boolean" default="false" wbld:cname="All" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Results">
    <xsd:sequence>
      <xsd:element name="Property" maxOccurs="255" wbld:cname="Property" type="CT_Result"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Join">
    <xsd:attribute name="Left" type="ST_ObjectName" use="required" wbld:cname="Left"/>
    <xsd:attribute name="Right" type="ST_ObjectName" use="required" wbld:cname="Right"/>
    <xsd:attribute name="LeftProperty" type="ST_LongString" use="required" wbld:cname="LeftProperty"/>
    <xsd:attribute name="RightProperty" type="ST_LongString" use="required" wbld:cname="RightProperty"/>
    <xsd:attribute name="Type" type="ST_JoinDirection" default="Inner" wbld:cname="Type" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Joins">
    <xsd:sequence>
      <xsd:element name="Join" wbld:cname="Join" minOccurs="0" maxOccurs="unbounded" type="CT_Join"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Parameter">
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Type" type="ST_FieldType" use="required" wbld:cname="Type"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Parameters">
    <xsd:sequence>
      <xsd:element name="Parameter" maxOccurs="unbounded" wbld:cname="Parameter" type="CT_Parameter"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_ParameterDefinition">
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Description" type="ST_LongString" wbld:cname="Description" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_ParameterDefinitions">
    <xsd:sequence>
      <xsd:element name="Parameter" maxOccurs="unbounded" wbld:cname="Parameter" type="CT_ParameterDefinition"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_ParameterValue">
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Value" type="ST_LongString" use="required" wbld:cname="Value"/>
  </xsd:complexType>
  <xsd:complexType name="CT_ParameterValues">
    <xsd:sequence>
      <xsd:element name="Parameter" maxOccurs="unbounded" wbld:cname="Parameter" type="CT_ParameterValue"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Query">
    <xsd:sequence>
      <xsd:element name="Parameters" minOccurs="0" type="CT_Parameters" wbld:cname="Parameters"/>
      <xsd:element name="References" type="CT_References" wbld:cname="References"/>
      <xsd:element name="Results" type="CT_Results" wbld:cname="Results"/>
      <xsd:element name="Joins" minOccurs="0" type="CT_Joins" wbld:cname="Joins"/>
      <xsd:element name="Restriction" type="CT_Expression" minOccurs="0" wbld:cname="Restriction"/>
      <xsd:element name="Ordering" minOccurs="0" type="CT_Ordering" wbld:cname="Ordering"/>
    </xsd:sequence>
    <xsd:attribute name="Name" type="ST_ObjectName" wbld:cname="Name" use="optional"/>
    <xsd:attribute name="Caption" type="ST_LongString" wbld:cname="Caption" use="optional"/>
    <xsd:attribute name="MinimumClientDesignVersion" type="ST_ShortString" wbld:cname="MinimumClientDesignVersion" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Argument">
    <xsd:complexContent>
      <xsd:extension base="CT_Expression">
        <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="CT_Action">
    <xsd:sequence>
      <xsd:element name="Argument" minOccurs="0" maxOccurs="unbounded" wbld:cname="Argument" type="CT_Argument"/>
      <xsd:element name="Parameters" minOccurs="0" type="CT_ParameterValues" wbld:cname="Parameters"/>
    </xsd:sequence>
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_ForEachRecordData">
    <xsd:sequence>
      <xsd:choice>
        <xsd:element name="Query" type="CT_Query" wbld:cname="Query"/>
        <xsd:element name="Reference" type="ST_ObjectName" wbld:cname="Reference"/>
      </xsd:choice>
      <xsd:element name="WhereCondition" minOccurs="0" type="CT_Expression" wbld:cname="WhereCondition"/>
      <xsd:element name="Parameters" minOccurs="0" type="CT_ParameterValues" wbld:cname="Parameters"/>
    </xsd:sequence>
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_ForEachRecord">
    <xsd:sequence>
      <xsd:element name="Data" wbld:cname="Data" type="CT_ForEachRecordData"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_LookupRecordData">
    <xsd:sequence>
      <xsd:choice>
        <xsd:element name="Query" type="CT_Query" wbld:cname="Query"/>
        <xsd:element name="Reference" type="ST_ObjectName" wbld:cname="Reference"/>
      </xsd:choice>
      <xsd:element name="WhereCondition" minOccurs="0" type="CT_Expression" wbld:cname="WhereCondition"/>
      <xsd:element name="Parameters" minOccurs="0" type="CT_ParameterValues" wbld:cname="Parameters"/>
    </xsd:sequence>
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_LookupRecord">
    <xsd:sequence>
      <xsd:element name="Data" wbld:cname="Data" type="CT_LookupRecordData"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_CreateRecordData">
    <xsd:choice>
      <xsd:element name="Reference" type="ST_ObjectName" wbld:cname="Reference"/>
    </xsd:choice>
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_CreateRecord">
    <xsd:sequence>
      <xsd:element name="Data" wbld:cname="Data" type="CT_CreateRecordData"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_EditRecordData">
    <xsd:attribute name="Alias" type="ST_ObjectName" wbld:cname="Alias" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_EditRecord">
    <xsd:sequence>
      <xsd:element name="Data" type="CT_EditRecordData" wbld:cname="Data"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceIf">
    <xsd:sequence>
      <xsd:element name="Condition" type="CT_Expression" wbld:cname="Condition"/>
      <xsd:element name="Statements" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceElseIf">
    <xsd:sequence>
      <xsd:element name="Condition" type="CT_Expression" wbld:cname="Condition"/>
      <xsd:element name="Statements" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceElse">
    <xsd:sequence>
      <xsd:element name="Statements" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_DataIf">
    <xsd:sequence>
      <xsd:element name="Condition" type="CT_Expression" wbld:cname="Condition"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_DataElseIf">
    <xsd:sequence>
      <xsd:element name="Condition" type="CT_Expression" wbld:cname="Condition"/>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_DataElse">
    <xsd:sequence>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceConditionalBlock">
    <xsd:sequence>
      <xsd:element name="If" wbld:cname="If" type="CT_UserInterfaceIf"/>
      <xsd:element name="ElseIf" minOccurs="0" maxOccurs="unbounded" wbld:cname="ElseIf" type="CT_UserInterfaceElseIf"/>
      <xsd:element name="Else" minOccurs="0" wbld:cname="Else" type="CT_UserInterfaceElse"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_DataConditionalBlock">
    <xsd:sequence>
      <xsd:element name="If" wbld:cname="If" type="CT_DataIf"/>
      <xsd:element name="ElseIf" minOccurs="0" maxOccurs="unbounded" wbld:cname="ElseIf" type="CT_DataElseIf"/>
      <xsd:element name="Else" minOccurs="0" wbld:cname="Else" type="CT_DataElse"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_Sub">
    <xsd:sequence>
      <xsd:element name="Statements" minOccurs="0" maxOccurs="unbounded" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceMacroStatements">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="Action" type="CT_Action" wbld:cname="Action"/>
      <xsd:element name="Comment" type="ST_LongString" wbld:cname="Comment"/>
      <xsd:element name="ConditionalBlock" type="CT_UserInterfaceConditionalBlock" wbld:cname="ConditionalBlock"/>
      <xsd:element name="StatementGroup" type="CT_UserInterfaceMacroStatementGroup" wbld:cname="StatementGroup"/>
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="CT_DataMacroStatements">
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element name="Action" type="CT_Action" wbld:cname="Action"/>
      <xsd:element name="Comment" type="ST_LongString" wbld:cname="Comment"/>
      <xsd:element name="ForEachRecord" type="CT_ForEachRecord" wbld:cname="ForEachRecord"/>
      <xsd:element name="LookUpRecord" type="CT_LookupRecord" wbld:cname="LookupRecord"/>
      <xsd:element name="CreateRecord" type="CT_CreateRecord" wbld:cname="CreateRecord"/>
      <xsd:element name="EditRecord" type="CT_EditRecord" wbld:cname="EditRecord"/>
      <xsd:element name="ConditionalBlock" type="CT_DataConditionalBlock" wbld:cname="ConditionalBlock"/>
      <xsd:element name="StatementGroup" type="CT_DataMacroStatementGroup" wbld:cname="StatementGroup"/>
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceMacroStatementGroup">
    <xsd:sequence>
      <xsd:element name="Statements" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Description" type="ST_LongString" wbld:cname="Description" use="optional"/>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_DataMacroStatementGroup">
    <xsd:sequence>
      <xsd:element name="Statements" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Description" type="ST_LongString" wbld:cname="Description" use="optional"/>
    <xsd:attribute name="Collapsed" type="xsd:boolean" wbld:cname="Collapsed" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_Application">
    <xsd:all>
      <xsd:element name="Properties" type="CT_PropertyBag" wbld:cname="Properties"/>
    </xsd:all>
  </xsd:complexType>
  <xsd:element name="Application" wbld:cname="Application" wbld:codeName="Application" type="CT_Application"/>
  <xsd:element name="Query" type="CT_Query" wbld:cname="Query" wbld:codeName="Query"/>
  <xsd:element name="Ordering" type="CT_AdHocOrdering" wbld:cname="Ordering" wbld:codeName="Ordering"/>
  <xsd:complexType mixed="true" name="CT_MacroReference">
    <xsd:attribute name="For" type="ST_ObjectName" wbld:cname="For" use="optional"/>
    <xsd:attribute name="Event" type="ST_UserInterfaceObjectEvent" wbld:cname="Event" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_UserInterfaceMacros">
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="UserInterfaceMacro" minOccurs="0" maxOccurs="unbounded" type="CT_UserInterfaceMacro" wbld:cname="UserInterfaceMacro"/>
      <xsd:element name="MacroReference" wbld:cname="MacroReference" type="CT_MacroReference"/>
    </xsd:choice>
  </xsd:complexType>
  <xsd:complexType name="CT_DataMacros">
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="DataMacro" minOccurs="0" maxOccurs="unbounded" type="CT_DataMacro" wbld:cname="DataMacro"/>
    </xsd:choice>
  </xsd:complexType>
  <xsd:element name="UserInterfaceMacros" wbld:cname="UserInterfaceMacros" wbld:codeName="UserInterfaceMacros" type="CT_UserInterfaceMacros"/>
  <xsd:element name="DataMacros" wbld:cname="DataMacros" wbld:codeName="DataMacros" type="CT_DataMacros"/>
  <xsd:element name="UserInterfaceMacro" wbld:cname="UserInterfaceMacro" wbld:codeName="UserInterfaceMacro" type="CT_UserInterfaceMacro"/>
  <xsd:complexType name="CT_UserInterfaceMacro">
    <xsd:sequence>
      <xsd:element name="Statements" minOccurs="0" type="CT_UserInterfaceMacroStatements" wbld:cname="Statements"/>
      <xsd:element name="Sub" minOccurs="0" maxOccurs="unbounded" type="CT_Sub" wbld:cname="Sub"/>
    </xsd:sequence>
    <xsd:attribute name="For" type="ST_ObjectName" wbld:cname="For" use="optional"/>
    <xsd:attribute name="Event" type="ST_UserInterfaceObjectEvent" wbld:cname="Event" use="optional"/>
    <xsd:attribute name="MinimumClientDesignVersion" type="ST_ShortString" wbld:cname="MinimumClientDesignVersion" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_DataMacro">
    <xsd:sequence>
      <xsd:element name="Parameters" minOccurs="0" type="CT_ParameterDefinitions" wbld:cname="Parameters"/>
      <xsd:element name="Statements" minOccurs="0" type="CT_DataMacroStatements" wbld:cname="Statements"/>
    </xsd:sequence>
    <xsd:attribute name="Event" type="ST_DataObjectEvent" wbld:cname="Event" use="optional"/>
    <xsd:attribute name="Name" type="ST_ObjectName" wbld:cname="Name" use="optional"/>
  </xsd:complexType>
  <xsd:complexType mixed="true" name="CT_RecordSource">
    <xsd:sequence>
      <xsd:element name="Query" type="CT_Query" minOccurs="0" wbld:cname="Query"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_ViewData">
    <xsd:all>
      <xsd:element name="RecordSource" minOccurs="0" wbld:cname="RecordSource" type="CT_RecordSource"/>
    </xsd:all>
    <xsd:attribute name="AllowEdits" type="xsd:boolean" default="true" wbld:cname="AllowEdits" use="optional"/>
    <xsd:attribute name="AllowDeletions" type="xsd:boolean" default="true" wbld:cname="AllowDeletions" use="optional"/>
    <xsd:attribute name="AllowAdditions" type="xsd:boolean" default="true" wbld:cname="AllowAdditions" use="optional"/>
    <xsd:attribute name="DataEntry" type="xsd:boolean" default="false" wbld:cname="DataEntry" use="optional"/>
    <xsd:attribute name="RecordSetType" type="xsd:string" wbld:cname="RecordSetType" use="optional"/>
  </xsd:complexType>
  <xsd:complexType name="CT_View">
    <xsd:sequence>
      <xsd:choice>
        <xsd:element ref="UserInterfaceMacros" minOccurs="0" wbld:cname="UserInterfaceMacros"/>
      </xsd:choice>
      <xsd:element name="Data" wbld:cname="Data" minOccurs="0" type="CT_ViewData"/>
      <xsd:element ref="a:Form" wbld:cname="Form"/>
    </xsd:sequence>
    <xsd:attribute name="Name" type="ST_ObjectName" use="required" wbld:cname="Name"/>
    <xsd:attribute name="MinimumClientDesignVersion" type="ST_ShortString" use="optional" wbld:cname="MinimumClientDesignVersion"/>
  </xsd:complexType>
  <xsd:element name="View" wbld:cname="View" wbld:codeName="View" type="CT_View"/>
  <xsd:complexType name="CT_Object">
    <xsd:sequence>
      <xsd:element name="Name" type="ST_ObjectName" wbld:cname="Name"/>
      <xsd:element name="Type" type="ST_ShortString" wbld:cname="Type"/>
      <xsd:element name="Mode" type="ST_ShortString" minOccurs="0" wbld:cname="Mode"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="CT_ApplicationReference">
    <xsd:sequence>
      <xsd:element name="URL" type="xsd:anyURI" wbld:cname="URL"/>
      <xsd:element name="Object" minOccurs="0" wbld:cname="Object" type="CT_Object"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="ApplicationReference" wbld:cname="ApplicationReference" wbld:codeName="ApplicationReference" type="CT_ApplicationReference"/>
</xsd:schema>

当我尝试使用它来验证已知良好的BeforeChange宏on this site时,我收到一条错误消息,指出

  

无法解析姓名&#39; a:表格&#39;致A(n)&#39;元素宣言&#39;成分

但是我删除了这行

<xsd:element ref="a:Form" wbld:cname="Form"/>

(第405行)从上面的XSD验证成功。