- Code: Select all
//derp.xml
<video>
<documentary>
<network>bbc</network>
<series>horizon</series>
<file type="video/avi" md5="cbc869306648e4c9f9fa2f774e1261c8">
<href>foo/bar.avi</href>
<width>688</width>
<height>384</height>
</file>
</documentary>
</video>
- Code: Select all
//derp.xsl
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<body>
<xsl:for-each select="video/documentary">
<xsl:for-each select="file">
object data=<xsl:value-of select="href"/>
width=<xsl:value-of select="width"/>
height=<xsl:value-of select="height"/>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
What I want to do is essentially <object data="<xsl:value-of select="href"/>" width="<xsl:value-of select="width"/>" height="<xsl:value-of select="height"/>"/>, but I know that won't work.
So, long question short, how do I coax data from an XML tag to an XHTML or XSL attribute? How can I get this URI to point an <object> towards my .avi?




