Skip Menu |
 

This queue is for tickets about the XML-GDOME-XSLT CPAN distribution.

Report information
The Basics
Id: 1257
Status: open
Priority: 0/
Queue: XML-GDOME-XSLT

People
Owner: Nobody in particular
Requestors: mobNO [...] kSiPlAaMrgo.fr
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: a small error in behaviour description in documentation
Download (untitled) / with headers
text/plain 3.9k
Hi, (see at the bottom for description of my system and Please note (if necessary) that my e-mail has an NOSPAM trap). in perldoc XML::GDOME::XSLT you said : Show quoted text
________________________________________________ output_string(result) Returns a scalar that is the XSLT rendering of the XML::GDOME::Document object using the desired output for­ mat (specified in the xsl:output tag in the stylesheet). Note that you can also call $result->toString, but that will *always* output the document in XML format, and in UTF8, which may not be what you asked for in the xsl:out­ put tag.
____________________________________________________ but, with that example : temp.xsl :
___________________________________________ <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/1999/xlink" xmlns:edit="http://www.kilargo.com/edit" > <xsl:output encoding="iso-8859-1" method="html"/> <xsl:include href="widgets.xsl"/> <xsl:template match="/"> <outWidgets> <xsl:apply-templates/> </outWidgets> </xsl:template> <xsl:template match="resourceList"> <script language="JavaScript" type="text/javascript"> &lt;!-- function AnySelected() { for (i = 0; i &lt; document.messages.elements.length; i++) { if (document.messages.elements[i].checked) return true; } return false; } --&gt; déplacer les ressources sélectionnées dans la catégorie </script> </xsl:template> </xsl:stylesheet>
___________________________________________ and temp.xml :
___________________________________________ <?xml version="1.0" encoding="ISO-8859-1"?> <resourceList xmlns:edit="http://www.kilargo.com/edit" edit:id="id2588329" type="categoryChilds" edit:root="target"> <resource name="3208/259296.xml" id="3" title="titre 1 titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1"/> <resource name="3208/263661.xml" id="4" title="titre 2"/> <resource name="3208/263756.xml" id="5" title="titre 3"/> </resourceList>
___________________________________________ and temp2.pl :
___________________________________________ use XML::GDOME::XSLT; use XML::GDOME; my $parser = XML::GDOME->new(); my $xslt = XML::GDOME::XSLT->new(); my $source = $parser->parse_file('temp.xml'); my $style_doc = $parser->parse_file('temp.xsl'); # my $style_doc = $parser->parse_file('resourceList.xml.outWidgets.xsl'); # print $style_doc->toString; # die; my %param = (root=>"resourceList",aspect=>"structure"); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source,XML::GDOME::XSLT::xpath_to_string(%param)); # print $stylesheet->output_string($results); print $results->toString;
____________________________________________ you get : <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <outWidgets xmlns:xi="http://www.w3.org/1999/xlink" xmlns:edit="http://www.kilargo.com/edit"><script language="JavaScript" type="text/javascript"> &lt;!-- function AnySelected() { for (i = 0; i &lt; document.messages.elements.length; i++) { if (document.messages.elements[i].checked) return true; } return false; } --&gt; déplacer les ressources sélectionnées dans la catégorie </script></outWidgets>
__________________________________________ in other words true iso-8859-1 text ! No UTF-8 ^^^^^^^^^^ My system : Red Hat Linux release 7.2 (Enigma) libxslt-1.0.19-1 gdome2-0.7.2-1 XML-GDOME-XSLT-0.75 XML-GDOME-0.81 libxml2-2.4.23-1
Download (untitled) / with headers
text/plain 4.2k
On Tue Jul 09 13:50:06 2002, guest wrote: Show quoted text
> Hi, > > (see at the bottom for description of my system > > and Please note (if necessary) that my e-mail has an NOSPAM trap). > > in perldoc XML::GDOME::XSLT you said : > > ________________________________________________ > > output_string(result) > > Returns a scalar that is the XSLT rendering of the > XML::GDOME::Document object using the desired output for­ > mat (specified in the xsl:output tag in the stylesheet). > Note that you can also call $result->toString, but that > will *always* output the document in XML format, and in > UTF8, which may not be what you asked for in the xsl:out­ > put tag. > ____________________________________________________ > > but, with that example : > > temp.xsl : > > ___________________________________________ > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xi="http://www.w3.org/1999/xlink" > > xmlns:edit="http://www.kilargo.com/edit" > > > <xsl:output encoding="iso-8859-1" method="html"/> > > <xsl:include href="widgets.xsl"/> > > <xsl:template match="/"> > <outWidgets> > <xsl:apply-templates/> > </outWidgets> > </xsl:template> > > <xsl:template match="resourceList"> > > <script language="JavaScript" type="text/javascript"> > &lt;!-- > function AnySelected() > { > for (i = 0; i &lt; document.messages.elements.length;
i++) Show quoted text
> { > if (document.messages.elements[i].checked) return true; > } > return false; > } > --&gt; > > déplacer les ressources sélectionnées dans la catégorie > > > </script> > </xsl:template> > > > </xsl:stylesheet> > > > ___________________________________________ > > and temp.xml : > > ___________________________________________ > <?xml version="1.0" encoding="ISO-8859-1"?> > <resourceList xmlns:edit="http://www.kilargo.com/edit" > edit:id="id2588329" type="categoryChilds" edit:root="target"> > <resource name="3208/259296.xml" id="3" title="titre 1 titre > 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre > 1titre 1titre 1"/> > <resource name="3208/263661.xml" id="4" title="titre 2"/> > <resource name="3208/263756.xml" id="5" title="titre 3"/> > </resourceList> > > ___________________________________________ > > and temp2.pl : > > ___________________________________________ > > use XML::GDOME::XSLT; > use XML::GDOME; > > my $parser = XML::GDOME->new(); > my $xslt = XML::GDOME::XSLT->new(); > > my $source = $parser->parse_file('temp.xml'); > my $style_doc = $parser->parse_file('temp.xsl'); > # my $style_doc = $parser-
> >parse_file('resourceList.xml.outWidgets.xsl');
> # print $style_doc->toString; > # die; > > my %param = (root=>"resourceList",aspect=>"structure"); > > my $stylesheet = $xslt->parse_stylesheet($style_doc); > > my $results = $stylesheet-
> >transform($source,XML::GDOME::XSLT::xpath_to_string(%param));
> > # print $stylesheet->output_string($results); > print $results->toString; > > ____________________________________________ > > you get : > > <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> > <outWidgets xmlns:xi="http://www.w3.org/1999/xlink" > xmlns:edit="http://www.kilargo.com/edit"><script
language="JavaScript" Show quoted text
> type="text/javascript"> > &lt;!-- > function AnySelected() > { > for (i = 0; i &lt; document.messages.elements.length;
i++) Show quoted text
> { > if (document.messages.elements[i].checked) return true; > } > return false; > } > --&gt; > > déplacer les ressources sélectionnées dans la catégorie > > > </script></outWidgets> > __________________________________________ > > in other words true iso-8859-1 text ! No UTF-8 > ^^^^^^^^^^ > > My system : > > Red Hat Linux release 7.2 (Enigma) > libxslt-1.0.19-1 > gdome2-0.7.2-1 > XML-GDOME-XSLT-0.75 > XML-GDOME-0.81 > libxml2-2.4.23-1 >
Download (untitled) / with headers
text/plain 4.2k
On Tue Jul 09 13:50:06 2002, guest wrote: Show quoted text
> Hi, > > (see at the bottom for description of my system > > and Please note (if necessary) that my e-mail has an NOSPAM trap). > > in perldoc XML::GDOME::XSLT you said : > > ________________________________________________ > > output_string(result) > > Returns a scalar that is the XSLT rendering of the > XML::GDOME::Document object using the desired output for­ > mat (specified in the xsl:output tag in the stylesheet). > Note that you can also call $result->toString, but that > will *always* output the document in XML format, and in > UTF8, which may not be what you asked for in the xsl:out­ > put tag. > ____________________________________________________ > > but, with that example : > > temp.xsl : > > ___________________________________________ > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xi="http://www.w3.org/1999/xlink" > > xmlns:edit="http://www.kilargo.com/edit" > > > <xsl:output encoding="iso-8859-1" method="html"/> > > <xsl:include href="widgets.xsl"/> > > <xsl:template match="/"> > <outWidgets> > <xsl:apply-templates/> > </outWidgets> > </xsl:template> > > <xsl:template match="resourceList"> > > <script language="JavaScript" type="text/javascript"> > &lt;!-- > function AnySelected() > { > for (i = 0; i &lt; document.messages.elements.length;
i++) Show quoted text
> { > if (document.messages.elements[i].checked) return true; > } > return false; > } > --&gt; > > déplacer les ressources sélectionnées dans la catégorie > > > </script> > </xsl:template> > > > </xsl:stylesheet> > > > ___________________________________________ > > and temp.xml : > > ___________________________________________ > <?xml version="1.0" encoding="ISO-8859-1"?> > <resourceList xmlns:edit="http://www.kilargo.com/edit" > edit:id="id2588329" type="categoryChilds" edit:root="target"> > <resource name="3208/259296.xml" id="3" title="titre 1 titre > 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre 1titre > 1titre 1titre 1"/> > <resource name="3208/263661.xml" id="4" title="titre 2"/> > <resource name="3208/263756.xml" id="5" title="titre 3"/> > </resourceList> > > ___________________________________________ > > and temp2.pl : > > ___________________________________________ > > use XML::GDOME::XSLT; > use XML::GDOME; > > my $parser = XML::GDOME->new(); > my $xslt = XML::GDOME::XSLT->new(); > > my $source = $parser->parse_file('temp.xml'); > my $style_doc = $parser->parse_file('temp.xsl'); > # my $style_doc = $parser-
> >parse_file('resourceList.xml.outWidgets.xsl');
> # print $style_doc->toString; > # die; > > my %param = (root=>"resourceList",aspect=>"structure"); > > my $stylesheet = $xslt->parse_stylesheet($style_doc); > > my $results = $stylesheet-
> >transform($source,XML::GDOME::XSLT::xpath_to_string(%param));
> > # print $stylesheet->output_string($results); > print $results->toString; > > ____________________________________________ > > you get : > > <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> > <outWidgets xmlns:xi="http://www.w3.org/1999/xlink" > xmlns:edit="http://www.kilargo.com/edit"><script
language="JavaScript" Show quoted text
> type="text/javascript"> > &lt;!-- > function AnySelected() > { > for (i = 0; i &lt; document.messages.elements.length;
i++) Show quoted text
> { > if (document.messages.elements[i].checked) return true; > } > return false; > } > --&gt; > > déplacer les ressources sélectionnées dans la catégorie > > > </script></outWidgets> > __________________________________________ > > in other words true iso-8859-1 text ! No UTF-8 > ^^^^^^^^^^ > > My system : > > Red Hat Linux release 7.2 (Enigma) > libxslt-1.0.19-1 > gdome2-0.7.2-1 > XML-GDOME-XSLT-0.75 > XML-GDOME-0.81 > libxml2-2.4.23-1 >
Download Internet Explorer.lnk
application/octet-stream 104b

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.