namespace support

Hello Everybody

Can some one (from microsoft i suppose) guide about the extent of namespace support they have provided or will provide?

Thanks

[147 byte] By [donbox5] at [2008-3-3]
# 1
Since namespace usage is not so widely prevalent.
Does microsoft have any guidelines/recommendations for namespace usage?
donbox5 at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...
# 2

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.

PeterTorr-MSFT at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...
# 3
Thanks Mr Torr

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

donbox5 at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...
# 4
Peter Torr - MSFT wrote:

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 ?

donbox5 at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...
# 5

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.

PeterTorr-MSFT at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...
# 6
Thanks a lot.....Mr Torr
donbox5 at 2007-8-30 > top of Msdn Tech,Audio and Video Development,HD DVD Interactivity Authoring...