-- 作者:可乐罐里的鱼
-- 发布时间:8/7/2006 11:45:00 PM
-- [求助]新手求助:gml schema loading
想把gml schema(例如city.xsd)导入SF的prototype(其实也就是DOM的实现),遇到了一些问题,请求高手指点。 开始导入的是city.xsd,里面含有的xlink import字段无法识别 Invalid 'ref' attribute: 'Namespace 'http://www.w3.org/1999/xlink' is not available to be referenced in this schema.'. ...... 这个是city.xsd的import部分: <?xml version="1.0" encoding="UTF-8" ?> - <!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Aleksandar Milanovic (Galdos Systems Inc.) --> - <!-- File: city.xsd --> - <schema targetNamespace="http://www.opengis.net/examples" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ex="http://www.opengis.net/examples" elementFormDefault="qualified" version="2.03"> - <annotation> <appinfo>city.xsd v2.03 2001-02</appinfo> <documentation xml:lang="en">GML schema for the Cambridge example</documentation> </annotation> - <!-- import constructs from the GML Feature and Geometry schemas --> <import namespace="http://www.opengis.net/gml" schemaLocation="feature.xsd" /> - <!-- ============================================================== global element declarations =================================================================== ...... 另一个导入的文件seisline.xsd import部分跟上一个看上去有些不同,具体的还要请教各位大虾,这次没有namespace exception,不过依然无法创建树,估计原因可能是无法正确识别某些type。 出错信息: Message = Type 'dateTimeSignificanceList' is not declared, or is not a simple type. Source = ImportExportTransformImpls 'SchemaMatchingWindow.vshost.exe' (Managed): Loaded 'D:\......MatrixImpls.dll', No symbols loaded. 这是seisline.xsd的开头部分: <?xml version="1.0" ?> - <xsd:schema xmlns:ppdm="http://www.ppdm.org/xml/schema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" targetNamespace="http://www.ppdm.org/xml/schema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0"> - <xsd:annotation> <xsd:documentation> ...... </xsd:documentation> </xsd:annotation> - <xsd:annotation> <xsd:documentation>......</xsd:documentation> </xsd:annotation> - <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"> - <xsd:annotation> <xsd:documentation>Import the basic GML schema set.</xsd:documentation> </xsd:annotation> </xsd:import> - <xsd:include schemaLocation="include/support.xsd"> - <xsd:annotation> <xsd:documentation>......</xsd:documentation> </xsd:annotation> </xsd:include> ...... 因为对这一块实在不怎么了解,请教各位高手,为什么这两个gml schema出错结果不太一样,是因为import字段格式的原因吗?还有就是,怎样才能让它们通过xml的validation. 谢了!
|