Thread XML::LibXSLT Probleme mit Namensraum (5 answers)
Opened by dater at 2010-03-08 13:40

GwenDragon
 2010-03-08 13:48
#134258 #134258
User since
2005-01-17
14612 Artikel
Admin1
[Homepage]
user image
Nein, keien Idee.

1. Da sinf etwas wenig Informationen, was denn bei CPAN:XML::LibXSLT nicht geht! Fehlermeldung? Was hast du probiert?
2. XML::XSLT ist uralt und hat einige Probleme beim Parsen (siehe XML transfomieren mittels XSLT).


Zu 1) Unter http://search.cpan.org/~pajas/XML-LibXSLT-1.70/Lib... steht:
Quote
parse_stylesheet($stylesheet_doc)

$stylesheet_doc here is an XML::LibXML::Document object (see XML::LibXML) representing an XSLT file. This method will return a XML::LibXSLT::Stylesheet object, or undef on failure. If the XSLT is invalid, an exception will be thrown, so wrap the call to parse_stylesheet in an eval{} block to trap this.

IMPORTANT: $stylesheet_doc should not contain CDATA sections, otherwise libxslt may misbehave. The best way to assure this is to load the stylesheet with no_cdata flag, e.g.
my $stylesheet_doc = XML::LibXML->load_xml(location=>"some.xsl", no_cdata=>1);

Last edited: 2010-03-08 13:51:08 +0100 (CET)

View full thread XML::LibXSLT Probleme mit Namensraum