Jtzero 511
Usenet Archive
- Joined
- Aug 11, 2010
- Messages
- 1
- Reaction score
- 0
this one is driving me up a wall, I cant seem to pass a param to the xslt what is wrong here? I keep getting nothingness...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl
aram name="stylesheet"/>
<xsl:template match="/">
<xsl:copy-of select="$stylesheet"/>
</xsl:template>
</xsl:stylesheet>
and heres the ruby code
require "rubygems"
require 'xml'
require 'libxml'
require 'libxslt'
xsltdoc = XML:
ocument.file("main.xslt")
xslt = LibXSLT::XSLT::Stylesheet.new(xsltdoc)
xml = XML:
ocument.file("file.xml")
result = xslt.apply(xml, {:stylesheet => "style.css"})
puts(result)
thank you,
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl
<xsl:template match="/">
<xsl:copy-of select="$stylesheet"/>
</xsl:template>
</xsl:stylesheet>
and heres the ruby code
require "rubygems"
require 'xml'
require 'libxml'
require 'libxslt'
xsltdoc = XML:
xslt = LibXSLT::XSLT::Stylesheet.new(xsltdoc)
xml = XML:
result = xslt.apply(xml, {:stylesheet => "style.css"})
puts(result)
thank you,