Update of /cvsroot/perl-xml/perl-xml-faq
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29057
Modified Files:
perl-xml-faq.xml
Log Message:
- add note about CPAN.pm conf init
Index: perl-xml-faq.xml
===================================================================
RCS file: /cvsroot/perl-xml/perl-xml-faq/perl-xml-faq.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- perl-xml-faq.xml 19 Feb 2004 09:05:44 -0000 1.16
+++ perl-xml-faq.xml 21 Oct 2004 18:01:32 -0000 1.17
@@ -785,6 +785,34 @@
</answer>
</qandaentry>
+ <qandaentry id="xml_xpathscript">
+ <question>
+ <para><classname>XML::XPathScript</classname></para>
+ </question>
+ <answer>
+
+ <para>XPathScript is a stylesheet language comparable to XSLT, for
+ transforming XML from one format to another (possibly HTML, but
+ XPathScript also shines for non-XML-like output).</para>
+
+ <para>Like XSLT, XPathScript offers a dialect to mix verbatim portions of
+ documents and code. Also like XSLT, it leverages the powerful
+ "templates/apply-templates" and "cascading stylesheets" design
+ patterns, that greatly simplify the design of stylesheets for
+ programmers. The availability of the XPath query language inside
+ stylesheets promotes the use of a purely document-dependent,
+ side-effect-free coding style. But unlike XSLT which uses its own
+ dedicated control language with an XML-compliant syntax, XPathScript
+ uses Perl which is terse and highly extendable.</para>
+
+ <para>As of version 0.13 of XML::XPathScript, the module can use either
+ <classname>XML::LibXML</classname> or <classname>XML::XPath</classname>
+ as its parsing engine. Transformations can be performed either using
+ a shell-based script or, in a web environment, within AxKit.</para>
+
+ </answer>
+ </qandaentry>
+
<qandaentry id="win32_expat">
<question>
<para>How can I install <classname>XML::Parser</classname> under
@@ -877,7 +905,13 @@
<classname>Compress::Zlib</classname>,
<classname>Archive::Tar</classname> and <classname>Net::FTP</classname>
modules if they are installed - and they are part of the ActiveState Perl
- distribution.</para>
+ distribution. Also don't worry if you make a mistake, you can repeat the
+ configuration process at any time by typing this command at the 'cpan>'
+ prompt:</para>
+
+ <programlisting><![CDATA[
+o conf init
+ ]]></programlisting>
<para>If you're behind a firewall, when you're asked for an FTP or HTTP
proxy enter it's URL like this:</para>
@@ -1331,8 +1365,8 @@
to a file as ISO-8859-1:</para>
<programlisting><![CDATA[
-open($fh,'>:encoding(iso-8859-1)', $path) or die "open($path): $!";
-$fh->print($utf_string);
+open my $fh, '>:encoding(iso-8859-1)', $path or die "open($path): $!";
+print $fh $utf_string;
]]></programlisting>
<para>The new core module 'Encode' can be used to translate between
@@ -1408,8 +1442,8 @@
</formalpara>
<programlisting><![CDATA[
-$fh = new IO::File $path, ">:encoding(iso-8859-1)" || die "open($path): $!";
-$fh->print($utf_string);
+open my $fh, '>:encoding(iso-8859-1)', $path or die "open($path): $!";
+print $fh $utf_string;
]]></programlisting>
<para>You can also push an encoding layer onto an already open filehandle
|