File: test_functions.rb

package info (click to toggle)
libxslt-ruby 0.9.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 368 kB
  • ctags: 374
  • sloc: ansic: 2,965; ruby: 333; xml: 145; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 320 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require "../xslt"

class XML::XSLT
	def round_trip( arg )
		arg
	end
	def type( arg )
		arg.class.to_s
	end
end

xslt = XML::XSLT.new()
xslt.xsl = "functions.xsl"
xslt.xml = "test.xml"
XML::XSLT.extFunction("round-trip", "http://test.none", xslt)
XML::XSLT.extFunction("type", "http://test.none", xslt)

puts xslt.serve