tclxslt/simple.tcl

Go to the documentation of this file.
00001 /* !/bin/sh*/
00002 /*  -*- tcl -*- \*/
00003 exec tclsh "$0" "$@"
00004 
00005 /*  simple.tcl --*/
00006 /* */
00007 /*  Simple transformation of a XML document,*/
00008 /*  from README.*/
00009 /* */
00010 /*  Copyright (c) 2008 Explain*/
00011 /*  http://www.explain.com.au/*/
00012 /* */
00013 /*  $Id$*/
00014 
00015 package require xml 3.2
00016 
00017  chan =  [open "count.xsl"]
00018  styleDoc =  [dom::parse [read $chan]]
00019 close $chan
00020  sourceDoc =  [dom::parse [read stdin]]
00021 
00022  style =  [xslt::compile $styleDoc]
00023  resultDoc =  [$style transform $sourceDoc]
00024 
00025 puts [dom::serialize $resultDoc]
00026 exit 0
00027 
00028 

Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1