Featured post
xml - Best way to perform XSL transformation in Ruby (XSLT 2.0) -
what best , efficient way to perform xsl transformation in ruby? have tried nokogiri, no matter tried results in:
compilation error: element stylesheet
the stylesheet works in xml editor.
i'm using ruby 1.9.3 on linux.
after poking around, found out nokogiri not support xslt 2.0:
nokogiri uses libxml2, supports xpath 1.0/xslt1.0
my stylesheet written using xslt 2.0 syntax. updated title of question reflect this. wish nokogiri responded in more meaningful way.
why want perform xsl transformation? curious.
i'm working on website submits xml feeds other sites. every feed has different format, source of data feed same. so, instead of writing custom code every feed decided use xsl stylesheets, served database. way can create new feeds uploading new stylesheet.
it possible use xslt 2.0 in jruby via saxon-xslt gem. don't think it's possible via other ruby implementations. mri ruby depend on libxml hasn't implemented xpath 2.0 yet. see this thread more information.
- Get link
- X
- Other Apps
Comments
Post a Comment