グーグルでオブリビオンにアクセスしていなかったら、私はここにいなかったでしょう。次の問題があります。XML スキーマ、3 つの単一の XML ドキュメント、および他の 3 つのすべてをリンクする XML ドキュメントがあります。次のエラーが発生しましたが、その理由がわかりません。
E [Xerces] cvc-complex-type.3.2.2: 属性「xml:base」は要素「SoftwareRequirementsDocument」に表示できません。
同様の問題を抱えている人々と一緒にGoogleからのフォーラム投稿をたくさん読んだことがありますが、彼らの修正はどれも役に立ちませんでした. スキーマ、接続する 1 つの XML ドキュメント、および XInclude を含む XML ドキュメントを投稿します。それが必要なものなので、各ドキュメントの冒頭を投稿します。
以下は NotionalSchema2.xsd です。
<xsd:element name="ProjectLifecycleDocuments" type="ProjectLifecycleDocumentsType"/>
<xsd:complexType name="ProjectLifecycleDocumentsType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="Team"/>
<xsd:element ref="SoftwareRequirementsDocument"/>
<xsd:element ref="UseCaseDocument"/>
<xsd:element ref="TestCaseDocument"/>
</xsd:choice>
<xsd:attribute name="id" use="required" type="xsd:ID"/>
</xsd:complexType>
<xsd:element name="SoftwareRequirementsDocument" type="SoftwareRequirementsDocumentType"/>
<xsd:complexType name="SoftwareRequirementsDocumentType">
<xsd:sequence>
<xsd:element ref="Section" maxOccurs="unbounded"/>
<!-- Other global elements to be referenced here. -->
</xsd:sequence>
<xsd:attribute name="projectName" use="required" type="xsd:string"/>
<!--<xsd:attribute name="id" use="required" type="xsd:ID"/>-->
</xsd:complexType>
ここに私の NotionalSRS2.xml があります:
<SoftwareRequirementsDocument projectName="Lifecycle Documents with Requirements
Tracking" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="NotionalSchema2.xsd"
xmlns:xx="http://apache.org/xml/features/xinclude/fixup-base-uris">
<Section id="RQ1.0">
<Title>Introduction</Title>
<Para>The Software Requirements Specification details the extent of NUWC’s Lifecycle Project Manager. The product’s main feature is it’s ability to create and manage lifecycle documents using a graphical user interface. The lifecycle documents will be organized and exported using an XML Schema. This can be accomplished by a user who has no knowledge of the XML language. This document will review all the basic functionality required for a user to edit, create, and manage lifecycle projects.
</Para>
</Section>
<Section id="RQ1.1">
<Title>Purpose</Title>
<Para> To provide a detailed description of how the product will produce it’s lifecycle documents as well as edit and export them. It also overviews the basic functional requirements requested by the customer.
</Para>
</Section>
XInclude、ProjectLifecycleDocuments.xmlを使用した私のファイルは次のとおりです。
<ProjectLifecycleDocuments id="PL1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="NotionalSchema2.xsd">
<xi:include href="NotionalSRS2.xml"/>
</ProjectLifecycleDocuments>
このエラーを検索するときに名前空間について多くのことを読みましたが、どこが間違っているのか明確に把握できませんでした。
このエラーが発生する理由と、それを修正する方法について正しい方向に向けることができれば、それは素晴らしいことです.