File: ext-test.tcl

package info (click to toggle)
tclxml 3.3~svn11-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,392 kB
  • sloc: ansic: 13,292; tcl: 11,656; xml: 3,269; sh: 559; makefile: 15
file content (25 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ext-test.tcl --
#
#	Implementation of test extension
#
# $Id: ext-test.tcl,v 1.1.1.1 2001/08/14 00:45:27 balls Exp $

package require xslt

namespace eval extTest {
    namespace export test
}

proc extTest::test args {
    return "extTest::test passed [llength $args] arguments"
}

set ch [open ext-test.xsl]
set xsl [read $ch]
close $ch

puts [list register extension]
::xslt::extension add http://tclxml.sf.net/XSLT/Test ::extTest

puts [list do transformation]
::xslt::transform $xsl <Test/>