XML Tutorial/Namespace/Attribute — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:27, 26 мая 2010
Namespaces and Attributes
Attributes usually don"t have namespaces the way elements do.
They are just "associated" with the elements to which they belong.
<person xmlns="http://www.wbex.ru"
<name id="25">
<title>Sir</title>
</name>
</person>
The id attribute is not part of this namespace.
The id attribute is simply associated with the <name> element.
If you used prefixes, you could specify that id is in a namespace.
<a:person xmlns:a="http://www.wbex.ru"
<a:name a:id="25"
<a:title>Sir</a:title>
</a:name>
</a:person>