简体   繁体   English

何时使用URN for xmlns

[英]when to use a URN for xmlns

For a "hello world" type xml document: 对于“hello world”类型的xml文档:

<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.w3.org/TR/REC-xml-names/ -->
<bk:book xmlns:bk="urn:loc.gov:books" xmlns:isbn="urn:ISBN:0-395-36341-6">
  <bk:title>Cheaper by the Dozen</bk:title>
  <isbn:number>1568491379</isbn:number>
</bk:book>

you can arbitrarily define urn's on the fly for custom purposes? 你可以随意定义urn用于自定义目的吗?

In short, yes. 简而言之,是的。 You can make 'em up as you like. 你可以随意制作它们。

我发现这个答案非常有用,它让我看到了这篇文章似乎说是的,你可以按照自己的意愿制作它们,如果你不打算在网上为给定的URL放置文档,那么你应该这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 何时使用 W3C 的 xmlns 和 xmlns:xsi 命名空间? - When to use W3C's xmlns and xmlns:xsi namespaces? 当我使用属性 xmlns 时 Peach 失败 - Peach fails when I use the attribute xmlns <Issuer xmlns='urn:oasis:names:tc:SAML:2.0:assertion'>没想到 - <Issuer xmlns='urn:oasis:names:tc:SAML:2.0:assertion'> was not expected XMLSerializer的: <ImplementationException xmlns='urn:epcglobal:ale:wsdl:1'> 没想到 - XMLSerializer: <ImplementationException xmlns='urn:epcglobal:ale:wsdl:1'> was not expected 当最外面的元素具有xmlns属性时,如何在骆驼中使用xpath? - How to use xpath in camel when the outermost element has an xmlns attribute? XSL无法读入带有标记“Document xmlns =”urn:iso:st“的xml - XSL can't read into a xml with the tag “Document xmlns=”urn:iso:st" PHP如何创建特殊元素<eanucc:countryISOCode xmlns:eanucc=“urn:ean.ucc:2”> - PHP how to Create special Element <eanucc:countryISOCode xmlns:eanucc=“urn:ean.ucc:2”> HTML5中“xmlns:v=urn:schemas-microsoft-com”是什么意思 - What is meaning of “xmlns:v=urn:schemas-microsoft-com” in HTML5 VSCode如何为使用URN xmlns的xml文件启用xml自动完成 - VSCode how to enable xml auto-complete for xml files that using URN xmlns 什么时候检查 xmlns? - When do xmlns get checked?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM