Jayx

I wonder if the xpath variables can be used like :
style:x="$style_x"
in <styling> in .xmu , and style_x is from
document.setXPathVariable("style_x","200px");
in .js .

I know the xpath variable can be used in <timing> and <body>.

Anybody can help me Thanks in advance.



Re: HD DVD Interactivity Authoring Can XPath variables be used in <styling>

donbox5

HI there

Xpath variables are meant to be used only inside Xpath Expressions (that's why they are called Xpath Variables :) ).

I guess at least pre-defined Xpath variables can be used in XMU (inside Xpath Expressions).

Author can define her own Xpath Variables in a js file.I am not sure whether author-defined variables can be used in XMU ( inside Xpath Expressions).






Re: HD DVD Interactivity Authoring Can XPath variables be used in <styling>

Jayx

Thanks donbox5.





Re: HD DVD Interactivity Authoring Can XPath variables be used in <styling>

Peter Torr - MSFT

Yes, you can use author-defined expressions inside timing blocks of your markup files, but as donbox5 says they can only be used in timing expressions, not in set or animate calls or as part of the styling block.

Remeber to set all your XPath variables to their default values during your markupLoadedHandler function, otherwise your markup will fail on the first tick.

If you just want to use a constant value in your markup, you can look at the pre-processor I wrote about on my blog.

http://blogs.msdn.com/ptorr/archive/2007/01/10/simple-pre-processor-for-hdi.aspx

If you really want to dynamically change the value of an animation, consider doing it via the Animated Property API instead of via timing.