cvc-complex-type.2.4.a:从元素'MarkupListURI'开始发现无效内容。预计会出现'{MarkupDeleteURI}'之一

[英]cvc-complex-type.2.4.a: Invalid content was found starting with element 'MarkupListURI'. One of '{MarkupDeleteURI}' is expected


I have been attempting to resolve this final issue with validating the return xml from the api to the xsd, in almost all instances that are similar the solution is to add the following line: elementFormDefault="qualified" however this line is already included in both the originating xsd and the child xsd.

我一直试图通过验证从api到xsd的返回xml来解决这个最后的问题,在几乎所有类似的实例中,解决方案是添加以下行:elementFormDefault =“qualified”但是这行已经包含在原始的xsd和子xsd。

The submitted xml is:

提交的xml是:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><SignedConfig>
  <Config>
    <RequestID>9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909</RequestID>
    <ClientID>1234</ClientID>
    <ClientIP>172.1.1.0</ClientIP>
    <HelpURI>http://www.google.com/HELP_URI</HelpURI>
    <BravaServerURL>http://www.google.com/BRAVA_SERVER_URL</BravaServerURL>
    <UserName>Kenneth Test</UserName>
    <MaxCacheSize>1</MaxCacheSize>
    <NumberPreloadedPages>2</NumberPreloadedPages>
    <UseMultiPartPost>false</UseMultiPartPost>
    <ResolveDBTokensURI>http://www.google.com/RESOLVE_DBTOKENS_URI</ResolveDBTokensURI>
    <UI>
      <UiOverride>UI Variant</UiOverride>
      <CssOverride>CSS Theme</CssOverride>
      <SinglePageLayout>true</SinglePageLayout>
      <EnableRasterRenderer>true</EnableRasterRenderer>
      <Hide>
        <Widget>closeButton</Widget>
      </Hide>
    </UI>
    <Documents/>
    <Features>
      <Search>
        <MatchCase>true</MatchCase>
        <WholeWord>true</WholeWord>
        <RegEx>true</RegEx>
        <EnableTermHits>true</EnableTermHits>
        <DefaultTermHits>true</DefaultTermHits>
        <InitialSearch>Initial Search</InitialSearch>
      </Search>
      <Thumbnails>
        <InitialWidth>13</InitialWidth>
      </Thumbnails>
      <Markups>
        <SaveParameters>
          <SaveParams/>
        </SaveParameters>
        <ChangemarkConfigURI>http://www.google.com/CHANGEMARK_CONFIG_URI</ChangemarkConfigURI>
        <EnableMarkupOverwrite>true</EnableMarkupOverwrite>
        <AlwaysOverrideSave>true</AlwaysOverrideSave>
        <EnableAutosave>true</EnableAutosave>
        <AutosaveMinutes>7</AutosaveMinutes>
        <StampPreviewSize>8</StampPreviewSize>
        <ImagePreviewSize>0</ImagePreviewSize>
        <MarkupEditListURI>http://www.google.com/MARKUP_EDIT_LIST_URI</MarkupEditListURI>
        <MarkupReviewListURI>http://www.google.com/MARKUP_REVIEW_LIST_URI</MarkupReviewListURI>
        <MarkupSaveURI>http://www.google.com/MARKUP_SAVE_URI</MarkupSaveURI>
        <MarkupListURI>http://www.google.com/BRAVA_SERVER_URL/markups/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</MarkupListURI>
        <MarkupDeleteURI>http://www.google.com/BRAVA_SERVER_URL/markups/delete/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?clientid=1234&amp;bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</MarkupDeleteURI>
      </Markups>
      <Print>
        <TimeoutMinutes>9</TimeoutMinutes>
      </Print>
      <Publish>
        <TIFFTimeoutMinutes>12</TIFFTimeoutMinutes>
        <PDFTimeoutMinutes>11</PDFTimeoutMinutes>
      </Publish>
      <ViewMode>
        <InitialZoom>Initial Zoom</InitialZoom>
        <MarkupEdit>Markup Edit</MarkupEdit>
        <RotateAll>14</RotateAll>
      </ViewMode>
      <TextSelect>
        <Enabled>true</Enabled>
      </TextSelect>
      <Download>
        <DocumentURI>http://www.google.com/DOCUMENT_URI</DocumentURI>
      </Download>
      <ExportBanners>
        <PersistSettingsOnNewBanner>true</PersistSettingsOnNewBanner>
        <PresetsURL>http://www.google.com/PRESETS_URL</PresetsURL>
        <Watermark>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
          <Opacity>0.25</Opacity>
        </Watermark>
        <TopLeft>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </TopLeft>
        <TopCenter>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </TopCenter>
        <TopRight>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </TopRight>
        <BottomLeft>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </BottomLeft>
        <BottomCenter>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </BottomCenter>
        <BottomRight>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </BottomRight>
        <LeftTop>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </LeftTop>
        <LeftCenter>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </LeftCenter>
        <LeftBottom>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </LeftBottom>
        <RightTop>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </RightTop>
        <RightCenter>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </RightCenter>
        <RightBottom>
          <Text/>
          <Color>#ff0000</Color>
          <Editable>true</Editable>
        </RightBottom>
      </ExportBanners>
      <Redactions>
        <RedactionReasonsURI>http://www.google.com/REASONS_URI</RedactionReasonsURI>
        <RedactionPatternsURI>http://www.google.com/REDACTION_PATTERNS_URI</RedactionPatternsURI>
      </Redactions>
      <ESignature>
        <AcknowledgeText>Esig Ackknowledge Text</AcknowledgeText>
        <EnableRasterEdit>true</EnableRasterEdit>
        <Images>
          <Name>Image Name</Name>
          <Sign>Image Sign</Sign>
          <Seal>Image Seal</Seal>
          <Date>Image Date</Date>
          <Title>Image Title</Title>
          <Initial>Image Initial</Initial>
        </Images>
        <EnableRasterSaves>true</EnableRasterSaves>
        <ESigRasterSaveURL>http://www.google.com/RASTER_SAVE_URL</ESigRasterSaveURL>
        <EnableAutoTemplateCreation>true</EnableAutoTemplateCreation>
        <AutoTemplateInformation>
          <TotalSigners>6</TotalSigners>
          <CurrentSigner>5</CurrentSigner>
          <InitialsLocation>http://www.google.com/INITIALS_LOCATION</InitialsLocation>
        </AutoTemplateInformation>
      </ESignature>
    </Features>
    <CustomParameters/>
    <PrintFrameURI>http://www.google.com/FRAME_URI</PrintFrameURI>
    <SessionID>9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909</SessionID>
    <PublishedDocumentURI>http://www.google.com/BRAVA_SERVER_URL/documents/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909/REVGQVVMVA?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</PublishedDocumentURI>
    <MobileDocumentURI>http://www.google.com/BRAVA_SERVER_URL/mobilepublishrequest/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</MobileDocumentURI>
    <StampTemplateURI>http://www.google.com/BRAVA_SERVER_URL/stamptemplates?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</StampTemplateURI>
    <RasterURI>http://www.google.com/BRAVA_SERVER_URL/rasters/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909/1234?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</RasterURI>
    <SearchURI>http://www.google.com/BRAVA_SERVER_URL/search/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</SearchURI>
    <SearchTextURI>http://www.google.com/BRAVA_SERVER_URL/search/searchtext/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?sessionid=null&amp;clientid=1234&amp;bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</SearchTextURI>
    <SearchIndicesURI>http://www.google.com/BRAVA_SERVER_URL/search/searchindices/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?sessionid=null&amp;clientid=1234&amp;bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</SearchIndicesURI>
    <MarkupRastersURI>Please remove as required</MarkupRastersURI>
    <HighlightURI>http://www.google.com/BRAVA_SERVER_URL/highlight/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</HighlightURI>
    <PublishToFormatURI>http://www.google.com/BRAVA_SERVER_URL/publishtoformat/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</PublishToFormatURI>
    <EventsURI>http://www.google.com/BRAVA_SERVER_URL/events</EventsURI>
    <Licenses>
      <License>markup_edit</License>
      <License>markup_review</License>
      <License>print</License>
      <License>branding</License>
      <License>pdf</License>
      <License>tiff</License>
      <License>redact</License>
    </Licenses>
  </Config>
  <Signature>grTCaJZBWOuj4x2GzCljvaqvMThayeA3gwTgbIfc2anQec6tUoBsPlEN6GSysxV4xmg8vn8QieWWFwE7CBXlVGsoPA3XFgAlV+s9CYKi1NIRziXwUTkSUbaJL8fJ2BWCPZXbi4A80Hz9CCtXY4mYZ82E2bCqMLAPx3xgm2L27AWvc3b7kznHTVidX6Mu0QAMGT7pxq666uBNh7K1ExRg56eerPQzhr9H1hdaZeOI21M0dOmTdwGMy8zlQ7HQlFhR696o0FLTtikVYH+Il38zsWuRXKXuCChvbZiH6DM8JL7xw3BHyL1fEyJwGvsd9/SgIKNIHualKYGxoGh4OodcMg==</Signature>
</SignedConfig>

The parent xsd is:

父xsd是:

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:include schemaLocation="Config.xsd"/>
    <xsd:element name="SignedConfig" type="SignedConfigType" />
    <xsd:complexType name="SignedConfigType">
        <xsd:sequence>
            <xsd:element name="Config" type="ConfigType" />
            <xsd:element name="Signature" type="xsd:string" />
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

And the child xsd is:

而孩子的xsd是:

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="Config" type="ConfigType" />
  <xsd:complexType name="ConfigType">
    <xsd:all>
      <xsd:element name="RequestID" type="xsd:string" />
      <xsd:element name="ClientID" type="xsd:int" />
      <xsd:element name="ClientIP" type="xsd:string" minOccurs="0" />
      <xsd:element name="HelpURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="BravaServerURL" type="xsd:anyURI" />
      <xsd:element name="UserName" type="xsd:string" minOccurs="0" />
      <xsd:element name="MaxCacheSize" type="xsd:int" />
      <xsd:element name="NumberPreloadedPages" type="xsd:int" />
      <xsd:element name="UseMultiPartPost" type="xsd:boolean" />
      <xsd:element name="ResolveDBTokensURI" type="xsd:anyURI" />
      <xsd:element name="UI" type="UIType" />      
      <xsd:element name="Licenses" type="LicensesType" />      
      <xsd:element name="Documents" type="DocumentsType" />
      <xsd:element name="Features" type="FeaturesType" />
      <xsd:element name="PublishedDocumentURI" type="xsd:anyURI" />
      <xsd:element name="MobileDocumentURI" type="xsd:anyURI" />
      <xsd:element name="StampTemplateURI" type="xsd:anyURI" />
      <xsd:element name="RasterURI" type="xsd:anyURI" />
      <xsd:element name="SearchURI" type="xsd:anyURI" />
      <xsd:element name="SearchTextURI" type="xsd:anyURI" />
      <xsd:element name="SearchIndicesURI" type="xsd:anyURI" />
      <xsd:element name="MarkupRastersURI" type="xsd:anyURI" />
      <xsd:element name="HighlightURI" type="xsd:anyURI" />
      <xsd:element name="PublishToFormatURI" type="xsd:anyURI" />
      <xsd:element name="EventsURI" type="xsd:anyURI" />
      <xsd:element name="CustomParameters" type="CustomParametersType" />
      <xsd:element name="PublishURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="PrintFrameURI" type="xsd:anyURI" />
      <xsd:element name="SessionID" type="xsd:string" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="UIType">
    <xsd:all>
      <xsd:element name="UiOverride" type="xsd:string" />
      <xsd:element name="CssOverride" type="xsd:string" />        
      <xsd:element name="SinglePageLayout" type="xsd:boolean" />
      <xsd:element name="EnableRasterRenderer" type="xsd:boolean" />
      <xsd:element name="Hide" type="HideType" />        
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="HideType">
    <xsd:sequence>
      <xsd:element name="Widget" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Tool" type="xsd:string"  minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="LicensesType">
    <xsd:sequence>
      <xsd:element name="License" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="FeaturesType">
    <xsd:all>
      <xsd:element name="Search" type="SearchType" />
      <xsd:element name="Thumbnails" type="ThumbnailsType" />
      <xsd:element name="Markups" type="MarkupsType" />
      <xsd:element name="Print" type="PrintType" />
      <xsd:element name="Publish" type="PublishType" />
      <xsd:element name="ViewMode" type="ViewModeType" />
      <xsd:element name="TextSelect" type="TextSelectType" />
      <xsd:element name="Download" type="DownloadType" />
      <xsd:element name="ExportBanners" type="ExportBannersType" />
      <xsd:element name="Redactions" type="RedactionsType" />
      <xsd:element name="ESignature" type="ESignatureType" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="ExportBannersType">
    <xsd:all>
      <xsd:element name="PersistSettingsOnNewBanner" type="xsd:boolean" />
      <xsd:element name="PresetsURL" type="xsd:string" />
      <xsd:element name="Watermark" type="WatermarkType" />
      <xsd:element name="TopLeft" type="BannerType" />
      <xsd:element name="TopCenter" type="BannerType" />
      <xsd:element name="TopRight" type="BannerType" />
      <xsd:element name="BottomLeft" type="BannerType" />
      <xsd:element name="BottomCenter" type="BannerType" />
      <xsd:element name="BottomRight" type="BannerType" />
      <xsd:element name="LeftTop" type="BannerType" />
      <xsd:element name="LeftCenter" type="BannerType" />
      <xsd:element name="LeftBottom" type="BannerType" />
      <xsd:element name="RightTop" type="BannerType" />
      <xsd:element name="RightCenter" type="BannerType" />
      <xsd:element name="RightBottom" type="BannerType" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="BannerType">
    <xsd:sequence>
      <xsd:element name="Text" type="xsd:string" />
      <xsd:element name="Color" type="xsd:string" />
      <xsd:element name="Editable" type="xsd:boolean" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="WatermarkType">
    <xsd:complexContent>
      <xsd:extension base="BannerType">
        <xsd:sequence>
          <xsd:element name="Opacity" type="xsd:decimal" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="DownloadType">
    <xsd:all>
      <xsd:element name="DocumentURI" type="xsd:anyURI" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="AnyType">
    <xsd:sequence>
      <xsd:any minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="TextSelectType">
    <xsd:sequence>
      <xsd:element name="Enabled" type="xsd:boolean" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ViewModeType">
    <xsd:all>
      <xsd:element name="InitialZoom" type="xsd:string" />
      <xsd:element name="MarkupEdit" type="xsd:string" />
      <xsd:element name="RotateAll" type="xsd:int" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="PublishType">
    <xsd:all>
      <xsd:element name="TIFFTimeoutMinutes" type="xsd:int" />
      <xsd:element name="PDFTimeoutMinutes" type="xsd:int" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="PrintType">
    <xsd:all>
      <xsd:element name="TimeoutMinutes" type="xsd:int" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="CustomParametersType">
    <xsd:sequence>
      <xsd:element maxOccurs="unbounded" name="Param" type="ParamType" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ParamType">
    <xsd:sequence>
      <xsd:element name="Name" type="xsd:string" />
      <xsd:element name="Value" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="SaveParamTypes">
    <xsd:sequence>
      <xsd:element name="SaveParams" type="xsd:string" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="MarkupsType">
    <xsd:sequence>
      <xsd:element name="SaveParameters" type="SaveParamTypes" />
      <xsd:element name="ChangemarkConfigURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="EnableMarkupOverwrite" type="xsd:boolean" />
      <xsd:element name="AlwaysOverrideSave" type="xsd:boolean" />
      <xsd:element name="EnableAutosave" type="xsd:boolean" />
      <xsd:element name="AutosaveMinutes" type="xsd:int" />
      <xsd:element name="StampPreviewSize" type="xsd:int" />
      <xsd:element name="ImagePreviewSize" type="xsd:int" />
      <xsd:element name="Markup" type="MarkupType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="MarkupListURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupEditListURI" type="xsd:anyURI" minOccurs="0"/>
      <xsd:element name="MarkupReviewListURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupSaveURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupDeleteURI" type="xsd:anyURI" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="MarkupType">
    <xsd:sequence>
      <xsd:element name="OpenForEdit" type="xsd:boolean" minOccurs="0" />
      <xsd:element name="URI" type="xsd:anyURI" />
      <xsd:element name="Author" type="xsd:string"/>
      <xsd:element name="Title" type="xsd:string"/>
      <xsd:element name="Date" type="xsd:decimal"/>
      <xsd:any minOccurs="0" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ThumbnailsType">
    <xsd:all>
      <xsd:element name="InitialWidth" type="xsd:int" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="SearchType">
    <xsd:all>
      <xsd:element name="MatchCase" type="xsd:boolean" />
      <xsd:element name="WholeWord" type="xsd:boolean" />
      <xsd:element name="RegEx" type="xsd:boolean" />
      <xsd:element name="EnableTermHits" type="xsd:boolean" />
      <xsd:element name="DefaultTermHits" type="xsd:boolean" />
      <xsd:element name="InitialSearch" type="xsd:string" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="DocumentsType">
    <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="unbounded" name="Document" type="DocumentType" />
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="DocumentType">
    <xsd:all>
      <xsd:element name="Title" type="xsd:string" />
      <xsd:element name="ScreenBanner" type="xsd:string" />
      <xsd:element name="ScreenWatermark" type="xsd:string" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="ESignatureType">
    <xsd:all>
      <xsd:element name="AcknowledgeText" type="xsd:string" />
      <xsd:element name="EnableRasterEdit" type="xsd:boolean" />
      <xsd:element name="Images" type="ImagesType" />
      <xsd:element name="EnableRasterSaves" type="xsd:boolean" />
      <xsd:element name="ESigRasterSaveURL" type="xsd:anyURI" />
      <xsd:element name="EnableAutoTemplateCreation" type="xsd:boolean" minOccurs="0"/>
      <xsd:element name="AutoTemplateInformation" type="AutoTemplateInformationType" minOccurs="0"/>
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="AutoTemplateInformationType">
    <xsd:all>
      <xsd:element name="TotalSigners" type="xsd:int" />
      <xsd:element name="CurrentSigner" type="xsd:int" />
      <xsd:element name="InitialsLocation" type="xsd:string" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="ImagesType">
    <xsd:all minOccurs="0">
      <xsd:element name="Name" type="xsd:string" />
      <xsd:element name="Sign" type="xsd:string" />
      <xsd:element name="Seal" type="xsd:string" />
      <xsd:element name="Date" type="xsd:string" />
      <xsd:element name="Title" type="xsd:string" />
      <xsd:element name="Initial" type="xsd:string" />
    </xsd:all>
  </xsd:complexType>
  <xsd:complexType name="RedactionsType">
    <xsd:all>
      <xsd:element name="RedactionReasonsURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="RedactionPatternsURI" type="xsd:anyURI" minOccurs="0" />
    </xsd:all>
  </xsd:complexType>
</xsd:schema>

The exact exception I am getting is:

我得到的确切例外是:

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1682; cvc-complex-type.2.4.a: Invalid content was found starting with element 'MarkupListURI'. One of '{MarkupDeleteURI}' is expected.

org.xml.sax.SAXParseException; lineNumber:1; columnNumber:1682; cvc-complex-type.2.4.a:从元素'MarkupListURI'开始发现无效内容。预计会出现'{MarkupDeleteURI}'之一。

Any help resolving this would be greatly appreciated.

任何帮助解决这个问题将不胜感激。

UPDATE: The following code was added to the xml as suggested:

更新:以下代码已按建议添加到xml:

<Markup>
  <OpenForEdit>true</OpenForEdit>
  <URI>http://www.google.com/URI</URI>
  <Author>Kenneth</Author>
  <Title>Owner</Title>
  <Date>9.55</Date>
</Markup>

Same error is displayed when attempting to validate the XML against the XSD

尝试根据XSD验证XML时显示相同的错误

3 个解决方案

#1


3  

That is your Markups definition:

这是你的Markups定义:

<xsd:complexType name="MarkupsType">
    <xsd:sequence>
      <xsd:element name="SaveParameters" type="SaveParamTypes" />
      <xsd:element name="ChangemarkConfigURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="EnableMarkupOverwrite" type="xsd:boolean" />
      <xsd:element name="AlwaysOverrideSave" type="xsd:boolean" />
      <xsd:element name="EnableAutosave" type="xsd:boolean" />
      <xsd:element name="AutosaveMinutes" type="xsd:int" />
      <xsd:element name="StampPreviewSize" type="xsd:int" />
      <xsd:element name="ImagePreviewSize" type="xsd:int" />
      <xsd:element name="Markup" type="MarkupType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="MarkupListURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupEditListURI" type="xsd:anyURI" minOccurs="0"/>
      <xsd:element name="MarkupReviewListURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupSaveURI" type="xsd:anyURI" minOccurs="0" />
      <xsd:element name="MarkupDeleteURI" type="xsd:anyURI" minOccurs="0" />
    </xsd:sequence>
  </xsd:complexType>

and this is your submited XML:

这是您提交的XML:

<Markups>
        <SaveParameters>
          <SaveParams/>
        </SaveParameters>
        <ChangemarkConfigURI>http://www.google.com/CHANGEMARK_CONFIG_URI</ChangemarkConfigURI>
        <EnableMarkupOverwrite>true</EnableMarkupOverwrite>
        <AlwaysOverrideSave>true</AlwaysOverrideSave>
        <EnableAutosave>true</EnableAutosave>
        <AutosaveMinutes>7</AutosaveMinutes>
        <StampPreviewSize>8</StampPreviewSize>
        <ImagePreviewSize>0</ImagePreviewSize>
        <MarkupEditListURI>http://www.google.com/MARKUP_EDIT_LIST_URI</MarkupEditListURI>
        <MarkupReviewListURI>http://www.google.com/MARKUP_REVIEW_LIST_URI</MarkupReviewListURI>
        <MarkupSaveURI>http://www.google.com/MARKUP_SAVE_URI</MarkupSaveURI>
        <MarkupListURI>http://www.google.com/BRAVA_SERVER_URL/markups/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</MarkupListURI>
        <MarkupDeleteURI>http://www.google.com/BRAVA_SERVER_URL/markups/delete/9cb5b8fe-62d8-4d52-ba32-58f1d1cc5909?clientid=1234&amp;bravaserverurl=http://www.google.com/BRAVA_SERVER_URL</MarkupDeleteURI>
      </Markups>

I don't see Markup element in your XML. Please check it!

我没有在XML中看到Markup元素。请检查一下!

UPDATE: Your definition use sequence not all. xs:sequence specifies that the child elements must appear in a sequence. Please try all or add elements in sequence.

更新:您的定义不是全部使用序列。 xs:sequence指定子元素必须出现在序列中。请尝试全部或按顺序添加元素。

#2


2  

Short version:

简洁版本:

Read the error message again, carefully. Think about why the validator issued that particular message, where it might have been in reading the document, and where the corresponding place might be in the schema. Look at those two places and see if you think the document shown is valid against the schema shown.

请仔细阅读错误消息。考虑验证器发出该特定消息的原因,它可能在读取文档的位置,以及模式中相应位置的位置。查看这两个位置,看看您是否认为显示的文档对所显示的模式有效。

Long version:

长版:

Your Markups element is declared as having type MarkupsType. That type expects a long list of element types, from SaveParameters down through MarkupDeleteURI. The Markups element in the instance you show has a lot of elements, most of which match the type declaration. But the instance includes an element named MarkupListURI, right before the element named MarkupDeleteURI. The type declaration doesn't include any reference to, or local declaration of, any such element. So the MarkupListURI element cannot validly occur where it does, given the schema you're showing. (This is what the error message is trying to tell you. It found a MarkupListURI element when it was expecting a MarkupDeleteURI.)

您的Markups元素被声明为具有MarkupsType类型。该类型需要一长串元素类型,从SaveParameters到MarkupDeleteURI。您显示的实例中的Markups元素有很多元素,其中大部分与类型声明匹配。但是实例包含一个名为MarkupListURI的元素,就在名为MarkupDeleteURI的元素之前。类型声明不包括对任何此类元素的任何引用或本地声明。因此,给定您正在显示的架构,MarkupListURI元素无法有效地发生在它所在的位置。 (这是错误消息试图告诉您的内容。它在期待MarkupDeleteURI时找到了MarkupListURI元素。)

Either the document is wrong and needs to be fixed by deleting the MarkupListURI element, or the schema is wrong and needs to be fixed by repairing the content model of MarkupsType to say what it is intended to say.

文档是错误的并且需要通过删除MarkupListURI元素来修复,或者模式是错误的并且需要通过修复MarkupsType的内容模型来修复它以说出它想要说的内容。

#3


1  

I had the same problem. It turns out that value of the element was string containing line break.

我有同样的问题。事实证明,元素的值是包含换行符的字符串。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2013/11/05/87f8070a0ff35727fcda40cbc0ff4930.html



 
© 2014-2018 ITdaan.com 粤ICP备14056181号