基本架构和命名空间问题 - 参考位置 [英] Basic schema and namespace question - location of reference

查看:72
本文介绍了基本架构和命名空间问题 - 参考位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您在xml文档中定义了xmlns,那么架构引用是否必须在该位置可用,或者字符串只是定义唯一值的方式?

If you have an xmlns defined in an xml document, does the schema reference have to be available at that location, or is the string just a way of defining a unique value?

例如,假设我在xml文档中有这样的引用

For example, say I had a reference in an xml document like this

< shipment xmlns =" http://schemas.warehousepartnersaaa.com/shipmentsdoc3-1"> ;

<shipments xmlns="http://schemas.warehousepartnersaaa.com/shipmentsdoc3-1">

...这里的节点......

...nodes here...

那么,是否必须有一个位于上述位置的物理xsd模式定义,或者更确切地说,这个xmlns声明只是一种将标识符唯一地分配给将在文档中使用的命名空间的方法吗?

So, does there have to be a physical xsd schema definition located at the above location, or rather this xmlns declaration is merely a way of uniquely assigning an identifier to the namespace that will be used in the document?

推荐答案

命名空间是NOTHING但是唯一的字符串。你应该定义一个世界上没有其他人使用的字符串,因此经常使用URL等。

The namespace is NOTHING but a unique string. You should define a string that nobody else in the world uses, therefore URLS etc. are often used.

但理论上你的命名空间可能是"MickeyMouse",你只需要确定没有其他人使用该命名空间: - )

But in theory your namespace could be "MickeyMouse", you just have to be sure that nobody else uses that namespace :-)

即使某些公司提供某种"架构位置",也是如此。连同它们的命名空间,两者之间没有技术关联。

An even if some companies supply some sort of "schema location" together with their namespace, there is no technical correlations between the two.

Morten la Cour

Morten la Cour

这篇关于基本架构和命名空间问题 - 参考位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆