我正在尝试将xsl嵌入到XML文件中。这样做的原因是创建一个可以移动到不同计算机的单个文件,这将阻止移动xsl文件的需要。
xsl文件正在创建一个表并从xml中获取测试步骤,无论是通过还是失败,都非常简单。
我认为,我遇到的问题是xsl具有javascript,并且在IE中加载xml时会显示它。
当我用IE加载xml文件时,javascript显示在表格上方,在表格下方显示xml。
以下是我的文件布局方式:
id ID #REQUIRED>
]>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="http://www.ni.com/TestStand"
xmlns:vb_user="http://www.ni.com/TestStand/" >
option explicit
'This function will return the localized decimal point for a decimal number
Function GetLocalizedDecimalPoint ()
dim lDecPoint
lDecPoint = Mid(CStr(1.1),2,1)
GetLocalizedDecimalPoint = lDecPoint
End Function
// 1. TSGraph control is not installed on the machine
// 2. Using the stylesheet in windows XP SP2. Security settings prevent stylesheets from creatign the GraphControl using scripting.
// Refer to the TestStand Readme for more information.
//more javascript functions
//code to build table and insert data from the xml
// rest of xml