以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  [求助]xsi:schemaLocation的用法  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=37706)


--  作者:gemingke
--  发布时间:9/7/2006 8:46:00 PM

--  [求助]xsi:schemaLocation的用法
呃,主要是看到以下实例有点发晕,不知道该怎么解读

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/
            http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd">

问一下,这是怎么回事?

PS:附上之前的说明文字

The SOAP namespace:
         http://schemas.xmlsoap.org/soap/envelope/
resolves to a W3C XML Schema specification.  The ebXML OASIS ebXML Messaging TC has provided an equivalent version of the SOAP schema conforming to the W3C Recommendation version of the XML Schema specification [XMLSchema].   
         http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd

All ebXML MSH implementations are strongly RECOMMENDED to include the XMLSchema-instance namespace qualified schemaLocation attribute in the SOAP Envelope element to indicate to validating parsers a location of the schema document that should be used to validate the document.  Failure to include the schemaLocation attribute could prevent XML schema validation of received messages.


--  作者:admin
--  发布时间:9/7/2006 11:33:00 PM

--  
那句话是说,schemaLocation 属性向 validating parsers 指明了schema文档的位置,以便 validating parsers 来验证该文档是否符合schema。 如果没有提供schemaLocation 属性,就不好对收到的消息进行验证。

另外,可以参见:

http://bbs.xml.org.cn/dispbbs.asp?boardID=23&ID=35354
http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=9270



--  作者:gemingke
--  发布时间:9/8/2006 8:16:00 PM

--  
就是说,schemalocation的值可以有多个?
--  作者:admin
--  发布时间:9/10/2006 11:04:00 PM

--  
以下是引用gemingke在2006-9-8 20:16:00的发言:
就是说,schemalocation的值可以有多个?

是这样的

http://www.imsglobal.org/xsd/imscp_v1p1 对应 imscp_v1p1p3.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 对应 imsmd_v1p2p2.xsd

一个是v1p1,一个是v1p2, 两个命名空间,当然对应两个schema document


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