【发布时间】:2015-01-12 16:28:00
【问题描述】:
我似乎无法解决这个问题,我真的很希望它能够工作。使用我的主架构 rfidImage.xsd,我想导入一个描述基于 base64 的 JPG 的 MIME 方案的架构。我想我已经尝试了所有可能的组合,除了使这项工作有效的组合。我可以放弃并将 xmlmime.xsd 中的模式代码包含到 rfidImage.xsd 中,但我想在这里进一步加深理解。这两个模式有不同的命名空间,所以我应该很好地使用导入而不是包含。所以,我的基本问题是这个错误信息:
导入的架构“xmlmime.xsd”的目标名称空间“http://www.quikq.com/xsd/rfidImage”与声明的“http://www.w3.org/2005/05/xmlmime”不同
我在 IBM AS/400、V7R1 和 C++、SAX2 解析器上使用旧版本的 Xerces(可能是 2.6)。
rfidImage.xsd:
<?xml version="1.0"?>
<xs:schema
targetNamespace="http://www.quikq.com/xsd/rfidImage"
xmlns="http://www.quikq.com/xsd/rfidImage"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.quikq.com/xsd/JPEGPicture"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
elementFormDefault="qualified">
<!-- Import a supporting document -->
<xs:import namespace="http://www.w3.org/2005/05/xmlmime"
schemaLocation="xmlmime.xsd"/>
xmlmime.xsd:
<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
targetNamespace="http://www.w3.org/2005/05/xmlmime">
我暂时迷路了。
【问题讨论】:
标签: c++ xml xsd xerces xerces-c