XML::LibXSLT a vystupni kodovani
Jan Kasprzak
kas na informatics.muni.cz
Čtvrtek Červenec 15 17:05:45 MEST 2004
Jan Kasprzak wrote:
: Mam XML dokument ktery pomoci XML::LibXSLT transformuju nejakou
: XSLT transformaci. No a ted bych z toho chtel dostat textovy vystup,
: idealne ve stejnem kodovani, jako byl puvodni dokument. Jak to udelat,
: kdyz $stylesheet->output_encoding je jen pro cteni?
Hmm, uz jsem na to prisel. Navratova hodnota ze $stylesheet->transform
je XML dokument, takze staci misto $stylesheet->output_string() udelat neco
jako
my $results = $stylesheet->transform($source);
$results->setEncoding($source->encoding);
a pak
print $results->serialize;
-Y.
--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
btw, David, I'm wondering about this loop: [...] Is this
a busy-wait-until-someone-plugs-in-more-ram-chips thing? ;) --Andrew Morton
Další informace o konferenci Perl