有人能帮我吗 ?我是 xsl/xml 进程的新手,我不确定我做错了什么......我有这段代码可以生成一个带有视频的 html:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" extension-element-prefixes="xalan" exclude-result-prefixes="xalan">
<xsl:variable name="StyleSheet"><xsl:text>html</xsl:text></xsl:variable>
<xsl:variable name="product" select="//...//someting..."/>
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="$product"/></title>
<BASE HREF="https://....com"/>
<LINK REL="stylesheet" TYPE="text/css" HREF="/style/rbc_new.css">
</LINK>
</head>
<body bgcolor="white">
<DIV>
<table width="670" border="0" bgcolor="#ffffff">
<tr>
<td>
<!--
This type of report is not available in HTML format. Please check the PDF version.
-->
VIDEO UPLOADED *:
</td>
</tr>
<tr>
<td valign="top" class="rbc_color1_font_10">
<xsl:variable name="video" select="concat(some file)"/>
<xsl:variable name="video2" select="other file">
<!-- THIS IS FOR Html4 & older versions and this one works -->
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="{$video}"/>
<param name="AutoStart" value="false"/>
<param name="ShowControls" value="true"/>
<param name="BufferingTime" value="2"/>
<param name="ShowStatusBar" value="true"/>
<param name="AutoSize" value="true"/>
<param name="InvokeURLs" value="false"/>
<embed src="{$video}" type="application/x-mplayer2" autostart="0" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>
</object>
<!--this is for html5 and this one does not work -->
<video width="320" height="240" controls>
<source src="{$video}" type="video/mp4">
Your browser does not support the video tag.
</video>
</td>
我究竟做错了什么 ?我应该把这样的 XSL 版本与 html5 一起使用(它有什么效果吗?)它仍然会运行 html4 类型吗??:
<xsl:output
method="xml"
doctype-system="about:legacy-compat"
encoding="UTF-8"
indent="yes" />
提前谢谢你。