小编ish*_*624的帖子

将XML嵌入XML以便在Web浏览器中显示:我做错了什么?

所以我试着去研究这个问题,而我几乎已经完成了我的智慧.我找到了一种在dpawson.co.uk上嵌入XML的方法,但我无法弄清楚我做错了什么.我在互联网上搜寻试图找到解决方案和解释,但没有人似乎有答案.

我正在尝试创建一个与服务器无关的文件,因此我可以将一个文件发送给我的同事,希望他们可以通过在Web浏览器中打开文件来查看该文件.

到目前为止,这是我的代码:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!--Start XSL-->

<?xml-stylesheet type="text/xml" href="#stylesheet"?>

<!DOCTYPE doc [
<!ATTLIST xsl:stylesheet
id ID #REQUIRED>
]>
<doc>

<xsl:stylesheet id="stylesheet"
                version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="xsl:stylesheet" />
    <!--Variables-->
    <xsl:variable name="a" select="list/movie/seen[@value ='Yes']" />
    <xsl:variable name="b" select="list/movie/seen" />
    <xsl:variable name="c" select="sum(list/movie/rating/@value)" />
    <xsl:variable name="d" select="$c div count($a)" />
    <xsl:variable name="e" select="count($a) div count($b)" />
    <xsl:variable name="f" select="list/movie/seen[@value ='No']" />
    <xsl:variable name="g" select="list/movie/seen[@value ='Prior']" />
    <xsl:variable name="h" select="count($f) div count($b)" />
    <xsl:variable name="j" select="count($g) div count($b)" …
Run Code Online (Sandbox Code Playgroud)

xml embed xslt

6
推荐指数
1
解决办法
7167
查看次数

标签 统计

embed ×1

xml ×1

xslt ×1