This allows you to define your own attributes etc. in your own namespace (assuming you add the right prefix in the root node) without clashing with any pre-defined attributes.
Does this mean in HDDVD .xmu files we can not declare namespaces at a node other than the root
I'm not sure exactly what you are asking, but here is some general info.
HD DVD requires that XML documents are well-formed and valid, but players must IGNORE any custom schemas location information, so they won't download and validate against a schema. The only schemas it "knows" about are the ones in the spec (core, state, style, etc.) that are hard-coded into iHD.
This allows you to define your own attributes etc. in your own namespace (assuming you add the right prefix in the root node) without clashing with any pre-defined attributes. The XML APIs are all namespace-aware (from DOM 2.0) and will work correctly. They just won't validate anything for you.
RE: Switching style and state: I wouldn't try that ;-). Although the XML side of things might still work, the built-in XPath functions (like style:backgroundColor(), etc.) might stop working. Even if it works on iHDSim (I haven't tried it), this is something that could break on other players because hard-coding style and state will likely give the best performance (and that's the way the spec is written). Best to play it safe and not mess with the built-in namespaces.
RE: Putting namespaces anywhere: XML allows this (and a quick check of the HD DVD spec doesn't disallow it... but it might be hidden somewhere :-) ), but if you want to maximize compatibility with all future potential players, it's probably best to stick to "the basics" and just add the declaration to the root.
So, in summary, if you want to use your own namespaces, I would suggest NOT re-defining a built-in namespace, and only placing the declaration on the root node.
namespace support
johnvarney
Does this mean in HDDVD .xmu files we can not declare namespaces at a node other than the root
spanky4_3
Does microsoft have any guidelines/recommendations for namespace usage
Patrick Severijns
Rraj
I'm not sure exactly what you are asking, but here is some general info.
HD DVD requires that XML documents are well-formed and valid, but players must IGNORE any custom schemas location information, so they won't download and validate against a schema. The only schemas it "knows" about are the ones in the spec (core, state, style, etc.) that are hard-coded into iHD.
This allows you to define your own attributes etc. in your own namespace (assuming you add the right prefix in the root node) without clashing with any pre-defined attributes. The XML APIs are all namespace-aware (from DOM 2.0) and will work correctly. They just won't validate anything for you.
Memom
RE: Switching style and state: I wouldn't try that ;-). Although the XML side of things might still work, the built-in XPath functions (like style:backgroundColor(), etc.) might stop working. Even if it works on iHDSim (I haven't tried it), this is something that could break on other players because hard-coding style and state will likely give the best performance (and that's the way the spec is written). Best to play it safe and not mess with the built-in namespaces.
RE: Putting namespaces anywhere: XML allows this (and a quick check of the HD DVD spec doesn't disallow it... but it might be hidden somewhere :-) ), but if you want to maximize compatibility with all future potential players, it's probably best to stick to "the basics" and just add the declaration to the root.
So, in summary, if you want to use your own namespaces, I would suggest NOT re-defining a built-in namespace, and only placing the declaration on the root node.
TheDesperado
umm...i have a question
Does the prefix "style" is bound ("hardcoded" ) to uri "http://www.dvdforum.org/2005/ihd#style"
similarly
are the bindings "state" :: "http://www.dvdforum.org/2005/ihd#state" and
"ihd" :: "http://www.dvdforum.org/2005/ihd" fixed.
and the default namespace is always "http://www.dvdforum.org/2005/ihd"
or can we do something like this
Can i do somwthing like this
<ihd:root xml:lang="en"
xmlns:ihd="http://www.dvdforum.org/2005/ihd#state#state"
xmlns="http://www.dvdforum.org/2005/ihd#style"
xmlns:style="http://www.dvdforum.org/2005/ihd#state"
xmlns:state="http://www.dvdforum.org/2005/ihd#style"
>
<ihd:body x="20px" y="30px" >
<ihd:div>
<ihd:button ihd:id = "buttonON" style:focused ="true" >
</ihd:button>
</ihd:body>
</ihd:root>
Maybe someone would never do that.just being curious.
Thanks