From: wjax . <wj...@ho...> - 2003-06-18 15:10:59
|
Hello, I am really desperate. I have started to use tcl/tk for a few days. And i need to make a xslt translation. So i have a rule file called rules.xsl and a xml called to_translate.xml. I have tried to do this: package require xslt 2.6 package require dom 2.6 set XML "c:/tcl/to_translate.xml" set xls "c:/tcl/rules.xls" set source_doc [::dom::libxml2::parse $XML] set ssheet_doc [::dom::libxml2::parse $xls] set ssheet [::xslt::compile $ssheet_doc] set result [$ssheet transform $source_doc] and it gives an error, it does not find "<", so i have though that the $XML must be a string with all the file read inside. So i have tried this: package require xslt 2.6 package require dom 2.6 set ch [open c:/tcl/meta.xml] fconfigure $ch -encoding shiftjis set XML [read $ch] set ch1 [open c:/tcl/engtra.xsl] fconfigure $ch1 -encoding shiftjis set xls [read $ch1] set source_doc [::dom::libxml2::parse $XML] set ssheet_doc [::dom::libxml2::parse $xls] set ssheet [::xslt::compile $ssheet_doc] set result [$ssheet transform $source_doc] And now it does not give error but it does not show anything, it says only "doc3" or something like that. But it does not return a translated file.... Can you help me please???? Thanks a lot. Ciao _________________________________________________________________ Descubre el mayor catálogo de coches de la Red en MSN Motor. http://motor.msn.es/researchcentre/ |