在我的Web服务项目中使用Eclipse我遇到了XML命名空间的问题,即我的项目中有以下模式:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" attributeFormDefault="unqualified" blockDefault="" elementFormDefault="qualified" finalDefault="" targetNamespace="http://www.w3.org/2001/04/xmlenc#" version="1.0">
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<complexType abstract="true" mixed="false" name="EncryptedType">
<sequence>
<element minOccurs="0" name="EncryptionMethod" type="xenc:EncryptionMethodType"/>
<element minOccurs="0" ref="ds:KeyInfo"/>
<element ref="xenc:CipherData"/>
<element minOccurs="0" ref="xenc:EncryptionProperties"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/>
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
</schema>
与
一致<element minOccurs="0" ref="ds:KeyInfo"/>
我收到以下错误:
src-resolve: Cannot resolve the name 'ds:KeyInfo' to a(n) 'element declaration' component.
我该怎么做才能解决这个问题?