code_junkie

Embed xsl into an XML file

Nov 12th, 2011
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <!DOCTYPE doc [
  2. <!ATTLIST xsl:stylesheet
  3. id ID #REQUIRED>
  4. ]>
  5.  
  6. <doc>
  7.  
  8. <xsl:stylesheet id="4.1.0"
  9. version="1.0"
  10. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  11. xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  12. xmlns:user="http://www.ni.com/TestStand"
  13. xmlns:vb_user="http://www.ni.com/TestStand/" >
  14.  
  15. <xsl:template match="xsl:stylesheet" />
  16. <xsl:text disable-output-escaping="yes">
  17.  
  18. <msxsl:script language="vbscript" implements-prefix="vb_user">
  19. option explicit
  20. 'This function will return the localized decimal point for a decimal number
  21. Function GetLocalizedDecimalPoint ()
  22. dim lDecPoint
  23. lDecPoint = Mid(CStr(1.1),2,1)
  24. GetLocalizedDecimalPoint = lDecPoint
  25. End Function
  26. </msxsl:script>
  27. <msxsl:script language="javascript" implements-prefix="user"><![CDATA[
  28. // This style sheet will not show tables instead of graphs for arrays of values if
  29. // 1. TSGraph control is not installed on the machine
  30. // 2. Using the stylesheet in windows XP SP2. Security settings prevent stylesheets from creatign the GraphControl using scripting.
  31. // Refer to the TestStand Readme for more information.
  32.  
  33. //more javascript functions
  34. //code to build table and insert data from the xml
  35.  
  36. </xsl:stylesheet>
  37.  
  38. <Reports>
  39. <Report Type='UUT' Title='UUT Report' Link='-1-2008-12-3-10-46-52-713' UUTResult='Failed' StepCount='51'>
  40.  
  41. // rest of xml
  42.  
  43. </Report>
  44.  
  45. </Reports>
  46. </doc>
  47.  
  48. <xsl:template>
Add Comment
Please, Sign In to add comment