以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  [求助]新手求助:gml schema loading  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=36525)


--  作者:可乐罐里的鱼
--  发布时间: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. 谢了!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
656.250ms