You can subscribe to this list here.
2002 |
Jan
(8) |
Feb
(22) |
Mar
(3) |
Apr
(13) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(5) |
Sep
(9) |
Oct
(36) |
Nov
(7) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(4) |
Feb
(1) |
Mar
(55) |
Apr
(25) |
May
(25) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(12) |
Oct
(6) |
Nov
(14) |
Dec
(1) |
2004 |
Jan
(1) |
Feb
(8) |
Mar
(6) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(3) |
Nov
(11) |
Dec
|
2005 |
Jan
(14) |
Feb
(3) |
Mar
(4) |
Apr
(14) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(2) |
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(19) |
Nov
(5) |
Dec
|
2007 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken M. <kma...@us...> - 2003-10-22 01:43:55
|
Update of /cvsroot/perl-xml/libxml-perl In directory sc8-pr-cvs1:/tmp/cvs-serv25009 Modified Files: ChangeLog Changes README Log Message: t/stream.t: fix bug in test 11 for Perl >= 5.6 Index: ChangeLog =================================================================== RCS file: /cvsroot/perl-xml/libxml-perl/ChangeLog,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- ChangeLog 23 Jul 2001 15:47:15 -0000 1.38 +++ ChangeLog 21 Oct 2003 16:01:53 -0000 1.39 @@ -1,3 +1,7 @@ +2003-10-21 Ken MacLeod <ke...@bi...> + + * t/stream.t: fixed test 11 for Perl >= 5.6 + 2001-07-23 Ken MacLeod <ke...@bi...> * lib/XML/SAX2Perl.pm (startElement): typo; reported by Index: Changes =================================================================== RCS file: /cvsroot/perl-xml/libxml-perl/Changes,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Changes 23 Jul 2001 15:47:15 -0000 1.26 +++ Changes 21 Oct 2003 16:01:54 -0000 1.27 @@ -2,23 +2,21 @@ Backwards incompatible changes are marked with a `*'. -0.08 - (t/stream.t Test 11 fails due to 8-bit characters on Perl 5.6, - reported by Ed Arnold <er...@uc...>) - (XML::ESISParser: include Robert Braddock's update for OpenSP, - in email 25Jul) - (XML::Parser::PerlSAX doesn't pass ParseParamEnt to - XML::Parser, inspired by a request by Paul Mahoney - <pt...@xa...>) - (switch Data::Grove::Visitor to use UNIVERSAL::can instead of - $self->{'has'}, suggested by Mike Richardson - <mi...@qu...>) - (no modules are yet supporting SAX2) - (XML::Parser::PerlSAX doesn't implement ErrorHandler, it - should at least call fatal_error() if XML::Parser dies; - reported by Craig N. Caroon <ca...@ca...>) - (t/xp_sax test fails with XML::Parser 2.28; reported by Dave - Viner <da...@pe...> on 29 Mar on perl-xml) +ToDo + - XML::ESISParser: include Robert Braddock's update for OpenSP, + in email 25Jul + - XML::Parser::PerlSAX doesn't pass ParseParamEnt to + XML::Parser, inspired by a request by Paul Mahoney + <pt...@xa...> + - switch Data::Grove::Visitor to use UNIVERSAL::can instead of + $self->{'has'}, suggested by Mike Richardson + <mi...@qu...> + - no modules are yet supporting SAX2 + - XML::Parser::PerlSAX doesn't implement ErrorHandler, it + should at least call fatal_error() if XML::Parser dies; + reported by Craig N. Caroon <ca...@ca...> + +0.08 Tue Oct 21 10:54:18 CDT 2003 - added Perl SAX 2.0 Binding - XML::ESISParser: add -E0 to nsgmls options so that nsgmls doesn't quit after 200 errors. Add more detail to command @@ -30,6 +28,8 @@ CAPRANI <ca...@mu...> - XML::SAX2Perl: typo in startElement; reported by Mark A. Hershberger <mh...@mc...> + - t/stream.t Test 11 fails due to 8-bit characters on Perl + 5.6, first reported by Ed Arnold <er...@uc...> 0.07 Tue Feb 22 14:24:52 CST 2000 - doc/index.html: libxml-perl site index Index: README =================================================================== RCS file: /cvsroot/perl-xml/libxml-perl/README,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- README 16 Aug 1999 19:52:38 -0000 1.9 +++ README 21 Oct 2003 16:01:54 -0000 1.10 @@ -30,7 +30,7 @@ View the Perl XML FAQ at <http://www.perlxml.com/faq/perl-xml-faq.html>. - Copyright (C) 1998 Ken MacLeod + Copyright (C) 1998 Ken MacLeod and others This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -45,18 +45,18 @@ ALPHA -- interfaces are changing, there may be lots of bugs, and there may not be docs available yet - XML::Parser::PerlSAX BETA + XML::Parser::PerlSAX STABLE XML::Parser::PerlSAX is a PerlSAX parser using XML::Parser (which uses James Clark's Expat XML Parser). - XML::Handler::Sample BETA + XML::Handler::Sample STABLE XML::Handler::Sample is a PerlSAX handler that simply prints out the event names as they are parsed by a PerlSAX parser. It can be used for debugging or as a template for building new handlers. XML::Handler::Sample contains handlers for all known parser events. - XML::ESISParser BETA + XML::ESISParser STABLE XML::ESISParser is a validating PerlSAX parser using James Clark's `nsgmls' SGML/XML Parser. ESISParser supports both XML and SGML document instances. Unless you need validation, @@ -66,26 +66,26 @@ XML::ESISParser with XML::Grove obsolete the SGML::SPGroveBuilder and SGML::Grove modules. - XML::Handler::XMLWriter + XML::Handler::XMLWriter STABLE A PerlSAX handler for writing readable XML (in contrast to Canonical XML, for example). XMLWriter is also subclassable and supports calling start and end methods by element-names (subclassed from XML::Handler::Subs). XMLWriter is similar to XML::Parser's Stream style. - XML::Handler::Subs + XML::Handler::Subs STABLE A PerlSAX handler base class that calls start and end methods by element-names. Subs is similar to XML::Parser's Subs style. - XML::Handler::CanonXMLWriter + XML::Handler::CanonXMLWriter STABLE A PerlSAX handler that outputs in Canonical XML <http://www.jclark.com/xml/canonxml.html>. This module is generally only used for debugging. - Data::Grove BETA - Data::Grove::Parent BETA - Data::Grove::Visitor BETA + Data::Grove STABLE + Data::Grove::Parent STABLE + Data::Grove::Visitor STABLE Data::Grove and it's helpers provide a base class for deeply nested or directed graph structures. Used by XML::Grove (and others soon). @@ -118,6 +118,10 @@ See Creating PatAct Modules for more information. DOCUMENTS + + sax-2.0.html, sax-2.0-adv.html + PerlSAX 2.0 bindings. Maintained by Robin Berjon and the + XML-Perl mailing list. PerlSAX This document defines a Perl binding to SAX 1.0. PerlSAX- |
From: Ken M. <kma...@us...> - 2003-10-22 01:16:03
|
Update of /cvsroot/perl-xml/libxml-perl/t In directory sc8-pr-cvs1:/tmp/cvs-serv25009/t Modified Files: stream.t Log Message: t/stream.t: fix bug in test 11 for Perl >= 5.6 Index: stream.t =================================================================== RCS file: /cvsroot/perl-xml/libxml-perl/t/stream.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- stream.t 16 Aug 1999 16:04:03 -0000 1.1 +++ stream.t 21 Oct 2003 16:01:54 -0000 1.2 @@ -61,7 +61,7 @@ 3rd line in bar <!-- Isn't this a doozy --> </bar> <zap fubar="1" ref="zing"></zap> - This, '\302\240', would be a bad character in UTF-8. + This, '\240', would be a bad character in UTF-8. </foo> EOF; |
From: Grant M. <gr...@us...> - 2003-10-15 18:06:45
|
Update of /cvsroot/perl-xml/perl-xml-faq In directory sc8-pr-cvs1:/tmp/cvs-serv11754 Modified Files: perl-xml-faq.xml Log Message: - linked to Ways to Rome articles - reordered XSLT section Index: perl-xml-faq.xml =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/perl-xml-faq.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- perl-xml-faq.xml 15 Oct 2003 09:43:34 -0000 1.11 +++ perl-xml-faq.xml 15 Oct 2003 18:06:41 -0000 1.12 @@ -428,6 +428,11 @@ for the libraries (binary builds are available for some platforms). Except where noted, the parsers are non-validating.</para> + <para>You can find more in-depth comparisons of the modules and example + source code in the <ulink + url="http://xmltwig.com/article/index_wtr.html">Ways to Rome</ulink> articles + maintained by Michel Rodriguez.</para> + <qandaentry id="xml_parser"> <question> <para><classname>XML::Parser</classname></para> @@ -885,28 +890,19 @@ 17</ulink> of the <ulink url="http://www.ibiblio.org/xml/books/bible2/">XML Bible</ulink>.</para> - <qandaentry id="xml_xslt"> + <qandaentry id="xml_libxslt"> <question> - <para><classname>XML::XSLT</classname></para> + <para><classname>XML::LibXSLT</classname></para> </question> <answer> - <para>This module aims to implement XSLT in Perl, so as long as you have - <classname>XML::Parser</classname> working you won't need to compile - anything to install it. The implementation is not complete, but work is - continuing and you can join the fun at the project's <ulink - url="http://xmlxslt.sourceforge.net/">SourceForge page</ulink>. The - <classname>XML::XSLT</classname> distribution includes a script you can - use from the command line like this:</para> - - <programlisting><![CDATA[ -xslt-parser -s toc-links.xsl perl-xml-faq.xml > toc.html - ]]></programlisting> - - <para>Egon Willighagen has written <ulink - url="http://www.linuxfocus.org/English/July2000/article156.shtml">An - Introduction to Perl's XML::XSLT module</ulink> at <ulink - url="http://www.linuxfocus.org/">linuxfocus.org</ulink>.</para> + <para>Matt Sergeant's <classname>XML::LibXSLT</classname> is a Perl + wrapper for the GNOME project's <ulink + url="http://xmlsoft.org/XSLT/">libxslt</ulink> library. The XSLT + implementation is almost complete and the project is under active + development. The library is written in C and uses libxml2 for XML + parsing. Matt's testing found that it was about twice as fast as + Sablotron.</para> </answer> </qandaentry> @@ -919,12 +915,11 @@ <para><ulink url="http://www.gingerall.com/charlie/ga/xml/p_sab.xml">Sablotron</ulink> - is an XSLT processor written in C++ and developed as an open source - project by <ulink url="http://www.gingerall.com/">Ginger - Alliance</ulink>. Since the XSLT engine is written in C++ and uses - <classname>expat</classname> for XML parsing, it's pretty quick. The - XSLT implementation is almost complete and the product is under active - development. <ulink + is an XML toolkit implementing XSLT 1.0, DOM Level2 and XPath 1.0. It is + written in C++ and developed as an open source project by <ulink + url="http://www.gingerall.com/">Ginger Alliance</ulink>. Since the XSLT + engine is written in C++ and uses <classname>expat</classname> for XML + parsing, it's pretty quick. <ulink url="http://www.gingerall.com/charlie/ga/xml/x_sabperl.xml"><classname>XML::Sablotron</classname></ulink> is a Perl module which provides full access to the Sablotron API (including a DOM with XPath support).</para> @@ -932,19 +927,28 @@ </answer> </qandaentry> - <qandaentry id="xml_libxslt"> + <qandaentry id="xml_xslt"> <question> - <para><classname>XML::LibXSLT</classname></para> + <para><classname>XML::XSLT</classname></para> </question> <answer> - <para>Matt Sergeant's <classname>XML::LibXSLT</classname> is a Perl - wrapper for the GNOME project's <ulink - url="http://xmlsoft.org/XSLT/">libxslt</ulink> library. The XSLT - implementation is almost complete and the project is under active - development. The library is written in C and uses libxml2 for XML - parsing. Matt's testing found that it was about twice as fast as - Sablotron.</para> + <para>This module aims to implement XSLT in Perl, so as long as you have + <classname>XML::Parser</classname> working you won't need to compile + anything to install it. The implementation is not complete, but work is + continuing and you can join the fun at the project's <ulink + url="http://xmlxslt.sourceforge.net/">SourceForge page</ulink>. The + <classname>XML::XSLT</classname> distribution includes a script you can + use from the command line like this:</para> + + <programlisting><![CDATA[ +xslt-parser -s toc-links.xsl perl-xml-faq.xml > toc.html + ]]></programlisting> + + <para>Egon Willighagen has written <ulink + url="http://www.linuxfocus.org/English/July2000/article156.shtml">An + Introduction to Perl's XML::XSLT module</ulink> at <ulink + url="http://www.linuxfocus.org/">linuxfocus.org</ulink>.</para> </answer> </qandaentry> |
From: Grant M. <gr...@us...> - 2003-10-15 09:43:46
|
Update of /cvsroot/perl-xml/perl-xml-faq In directory sc8-pr-cvs1:/tmp/cvs-serv21331 Modified Files: perl-xml-faq.xml Log Message: - de-emphasised XML::DOM and 'promoted' XML::LibXML Index: perl-xml-faq.xml =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/perl-xml-faq.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- perl-xml-faq.xml 14 Oct 2003 09:13:47 -0000 1.10 +++ perl-xml-faq.xml 15 Oct 2003 09:43:34 -0000 1.11 @@ -442,8 +442,9 @@ interfaces. The stream interface is not SAX, so don't use it for any new code. The tree interfaces are not a lot of fun to work with either. They're non-standard (no DOM support), not OO and offer no real API. The - reason you want <classname>XML::Parser</classname> is because it provides - a solid base which is used by the modules you want to use.</para> + reason you might want <classname>XML::Parser</classname> is because it + provides a solid base which is used by other modules with better + APIs.</para> <para>Before you rush off and try to install <classname>XML::Parser</classname>, make sure that you haven't got it @@ -462,88 +463,80 @@ </answer> </qandaentry> - <qandaentry id="xml_dom"> + <qandaentry id="xml_libxml"> <question> - <para><classname>XML::DOM</classname></para> + <para><classname>XML::LibXML</classname></para> </question> <answer> - <para>Enno Derksen's <classname>XML::DOM</classname> implements the - <ulink url="http://www.w3.org/TR/REC-DOM-Level-1/">W3C DOM Level 1</ulink> - tree structure and API (DOM Level 1 does not include namespace support). - Although you can find nodes in the tree by tag name, you can't use XPath - expressions.</para> - - <para>The distribution includes - <classname>XML::DOM::ValParser</classname> which performs validation - while building the DOM tree. It also includes - <classname>XML::Handler::BuildDOM</classname> which can build a DOM tree - from SAX (version 1) events.</para> - - <para>TJ Mather is currently the maintainer of this package.</para> + <para><classname>XML::LibXML</classname> provides a Perl wrapper around + the GNOME Project's libxml2 library. This module was originally written + by Matt Sergeant and is now actively maintained by Christian Glahn. It + is very fast, complete and stable. It can run in validating or + non-validating modes and offers a DOM with XPath support. The DOM and + associated memory management is implemented in C which offers significant + performance advantages over DOM trees built from Perl datatypes. The + <classname>XML::LibXML::SAX::Builder</classname> module allows a libxml2 + DOM to be constructed from SAX events. + <classname>XML::LibXML::SAX</classname> is a SAX parser based on the + libxml2 library.</para> </answer> </qandaentry> - <qandaentry id="xml_simple"> + <qandaentry id="xml_xpath"> <question> - <para><classname>XML::Simple</classname></para> + <para><classname>XML::XPath</classname></para> </question> <answer> - <para>Grant McLean's <classname>XML::Simple</classname> was originally - designed for working with configuration files in XML format but it can be - used for more general purpose XML work too. The 'simple tree' data - structure is nothing more than standard Perl hashrefs and arrays - there - is no API for finding or transforming nodes. This module is also not - suitable for working with 'mixed content'. - <classname>XML::Simple</classname> has it's own <ulink - url="http://search.cpan.org/dist/XML-Simple/lib/XML/Simple/FAQ.pod">frequently asked - questions</ulink> document.</para> - - <para>Although <classname>XML::Simple</classname> uses a tree-style, the - module also supports building the tree from SAX events or using a simple - Perl data structure to drive a SAX pipeline.</para> + <para>Matt Sergeant's <classname>XML::XPath</classname> module provides a + DOM implementation (in Perl) which supports XPath queries. It can't + rival <classname>XML::LibXML::SAX</classname> for speed but it may be + easier to install - especially if you don't have a compiler. Parsing XML + documents is performed by the expat library via + <classname>XML::Parser</classname>. You can serialise the DOM to SAX + events.</para> </answer> </qandaentry> - <qandaentry id="xml_xpath"> + <qandaentry id="xml_dom"> <question> - <para><classname>XML::XPath</classname></para> + <para><classname>XML::DOM</classname></para> </question> <answer> - <para>Matt Sergeant's <classname>XML::XPath</classname> module provides a - DOM implementation (in Perl) which supports XPath queries. Parsing XML - documents is performed by the expat library via - <classname>XML::Parser</classname>. You can serialise the DOM to SAX - events.</para> + <para>Enno Derksen's <classname>XML::DOM</classname> implements the + <ulink url="http://www.w3.org/TR/REC-DOM-Level-1/">W3C DOM Level + 1</ulink> tree structure and API. It should not be your first choice of + DOM module however, since it lacks XPath and namespace support and it is + significantly slower than libxml.</para> + + <para>TJ Mather is currently the maintainer of this package.</para> </answer> </qandaentry> - <qandaentry id="xml_libxml"> + <qandaentry id="xml_simple"> <question> - <para><classname>XML::LibXML</classname></para> + <para><classname>XML::Simple</classname></para> </question> <answer> - <para><classname>XML::LibXML</classname> provides a Perl wrapper around - the GNOME Project's libxml2 library. This module was originally written - by Matt Sergeant and is now actively maintained by Christian Glahn. It - is very fast, complete and stable. It can run in validating or - non-validating modes and offers a DOM with XPath support. The DOM and - associated memory management is implemented in C which offers significant - performance advantages over DOM trees built from Perl datatypes. The - <classname>XML::LibXML::SAX::Builder</classname> module allows a libxml2 - DOM to be constructed from SAX events.</para> + <para>Grant McLean's <classname>XML::Simple</classname> was originally + designed for working with configuration files in XML format but it can be + used for more general purpose XML work too. The 'simple tree' data + structure is nothing more than standard Perl hashrefs and arrays - there + is no API for finding or transforming nodes. This module is not suitable + for working with 'mixed content'. <classname>XML::Simple</classname> has + it's own <ulink + url="http://search.cpan.org/dist/XML-Simple/lib/XML/Simple/FAQ.pod">frequently + asked questions</ulink> document.</para> - <para><classname>XML::LibXML</classname> can also generate SAX events but - this is implemented by parsing the complete document to a DOM tree and - then serialising the tree to SAX events. This is still quick for - moderately sized documents but doesn't offer SAX's normal low memory - advantages for large documents.</para> + <para>Although <classname>XML::Simple</classname> uses a tree-style, the + module also supports building the tree from SAX events or using a simple + Perl data structure to drive a SAX pipeline.</para> </answer> </qandaentry> |
From: Grant M. <gr...@us...> - 2003-10-14 09:13:51
|
Update of /cvsroot/perl-xml/perl-xml-faq In directory sc8-pr-cvs1:/tmp/cvs-serv26784 Modified Files: faq-style.xsl faq.css perl-xml-faq.xml Log Message: - added XML::Validator::Schema section - updated XML::XSLT status - rewrote Perl 5.8 section in the present tense :-) - rewrote html form section - fixed DOCTYPE for DocBook 4.2 - corrected SYSTEM URI for use with catalog - added paragraph on pull parsing - numerous minor tweaks perl-xml-faq.xml Index: faq-style.xsl =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/faq-style.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- faq-style.xsl 19 Jun 2002 21:30:29 -0000 1.4 +++ faq-style.xsl 14 Oct 2003 09:13:47 -0000 1.5 @@ -4,10 +4,23 @@ xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default"> -<!-- This is where I chose to install the DocBook XSL Stylesheets --> -<!-- from: http://docbook.sourceforge.net/projects/xsl/index.html --> +<!-- -<xsl:import href="/usr/share/xml/docbook/xslt/html/docbook.xsl"/> + This stylesheet merely imports the Docbook XSL stylesheets and sets a few + parameters. Download the stylesheets from: + + http://docbook.sourceforge.net/projects/xsl/index.html + + Unpack them onto your system and set up a catalog entry to map the URI of + the 'current' release to the directory where you unpacked it, eg: + + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current" + rewritePrefix="docbook-xsl-1.62.0" /> +--> + + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/> <!-- Parameter settings --> @@ -21,8 +34,6 @@ </xsl:param> - - <!-- Templates to override defaults --> <xsl:template match="question/para"> @@ -33,11 +44,39 @@ <br /><b><xsl:value-of select="." /></b><br /> </xsl:template> -<!-- Why didn't this work? -<xsl:template match="revhistory"> - <p>Revision History Here</p> +<xsl:template match="revhistory" mode="titlepage.mode"> + <div class="revhistory"> + <p class="title"><b>Last updated:</b> + <xsl:text> </xsl:text> + <xsl:call-template name="monthname"> + <xsl:with-param name="monthnum" select="substring(./revision/date, 13, 2)"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="substring(./revision/date, 16, 2)" /> + <xsl:text>, </xsl:text> + <xsl:value-of select="substring(./revision/date, 8, 4)" /> + </p> + </div> +</xsl:template> + +<xsl:template name="monthname"> + <xsl:param name="monthnum">0</xsl:param> + <xsl:choose> + <xsl:when test="$monthnum = 1">January</xsl:when> + <xsl:when test="$monthnum = 2">February</xsl:when> + <xsl:when test="$monthnum = 3">March</xsl:when> + <xsl:when test="$monthnum = 4">April</xsl:when> + <xsl:when test="$monthnum = 5">May</xsl:when> + <xsl:when test="$monthnum = 6">June</xsl:when> + <xsl:when test="$monthnum = 7">July</xsl:when> + <xsl:when test="$monthnum = 8">August</xsl:when> + <xsl:when test="$monthnum = 9">September</xsl:when> + <xsl:when test="$monthnum = 10">October</xsl:when> + <xsl:when test="$monthnum = 11">November</xsl:when> + <xsl:when test="$monthnum = 12">December</xsl:when> + <xsl:otherwise><xsl:value-of select="$monthnum"/></xsl:otherwise> + </xsl:choose> </xsl:template> ---> </xsl:stylesheet> Index: faq.css =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/faq.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- faq.css 17 Apr 2002 20:46:36 -0000 1.2 +++ faq.css 14 Oct 2003 09:13:47 -0000 1.3 @@ -1,45 +1,50 @@ BODY { background: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - font-weight: normal; -} - -TD { - background: #FFFFFF; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; + font-size: 90%; font-weight: normal; } - -TH { - background: #FFFFFF; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; -} - -.programlisting { - padding-top: 10; - padding-left: 8; - background-color: #ffffe0; -} H1.title { - padding: 6; + padding: 0.2em; border-style: solid; - border-width: 2; + border-width: 2px; border-color: #eeeeee; } H3.title { - padding: 4; - margin-top: 20; + padding: 0.4em; + margin-top: 2em; border-style: solid; - border-width: 2; + border-width: 2px; border-color: #eeeeee; } +DIV.abstract { + margin: 2em; + padding: 1em; + background-color: #eeeeee; +} + +DIV.abstract P.title { + font-size: 120%; +} + DIV.revhistory { width: 400px; } + +TR.question TD { + padding-top: 1.0em; +} + +TT { + font-size: 120%; +} + +.programlisting { + padding-top: 0.8em; + padding-left: 0.8em; + background-color: #ffffe0; +} + Index: perl-xml-faq.xml =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/perl-xml-faq.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- perl-xml-faq.xml 19 Jun 2002 21:29:41 -0000 1.9 +++ perl-xml-faq.xml 14 Oct 2003 09:13:47 -0000 1.10 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="no"?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2b1//EN" - "file:///usr/share/xml/docbook/4.2b1/docbookx.dtd" +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" > <article class="faq"> @@ -16,6 +16,7 @@ </author> <copyright> <year>2002</year> + <year>2003</year> <holder>Grant McLean</holder> </copyright> @@ -32,7 +33,7 @@ most common question for beginners - "Where do I start?"</para> <para>The official home for this document on the web is: - <ulink url="http://www.perlxml.net/perl-xml-faq.dkb">http://www.perlxml.net/perl-xml-faq.dkb</ulink>. + <ulink url="http://perl-xml.sourceforge.net/faq/">http://perl-xml.sourceforge.net/faq/</ulink>. The official source for this document is in CVS on <ulink url="http://www.sourceforge.net/">SourceForge</ulink> at <ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/perl-xml/perl-xml-faq/" @@ -365,6 +366,16 @@ stream style. You configure the parser and it gives you the document in chunks (bits of the tree or 'twigs').</para> + <para>Finally, the latest trendy buzzword in Java and C# circles is + 'pull' parsing (see <ulink url="http://www.xmlpull.org/" + >www.xmlpull.org</ulink>). Unlike SAX, which 'pushes' events at your + code, the pull paradigm allows your code to ask for the next bit when + it's ready. This approach is reputed to allow you to structure your code + more around the data rather than around the API. Eric Bohlman's + <classname>XML::TokeParser</classname> offers a simple but powerful + pull-based API on top of <classname>XML::Parser</classname>. There + are currently no Perl implementations of the XMLPULL API.</para> + </answer> </qandaentry> @@ -487,7 +498,7 @@ is no API for finding or transforming nodes. This module is also not suitable for working with 'mixed content'. <classname>XML::Simple</classname> has it's own <ulink - url="http://web.co.nz/~grantm/cpan/xmlsimple/faq.html">frequently asked + url="http://search.cpan.org/dist/XML-Simple/lib/XML/Simple/FAQ.pod">frequently asked questions</ulink> document.</para> <para>Although <classname>XML::Simple</classname> uses a tree-style, the @@ -887,13 +898,13 @@ </question> <answer> - <para>This module aims to implement XSLT in Perl, so the good news is - that so long as you have <classname>XML::Parser</classname> working you - won't need to compile anything to install this module. The bad news is - that it is not a complete implementation of the XSLT spec, it is still in - 'alpha' state and it's not clear whether it is under active development. - The <classname>XML::XSLT</classname> distribution includes a script you - can use from the command line like this:</para> + <para>This module aims to implement XSLT in Perl, so as long as you have + <classname>XML::Parser</classname> working you won't need to compile + anything to install it. The implementation is not complete, but work is + continuing and you can join the fun at the project's <ulink + url="http://xmlxslt.sourceforge.net/">SourceForge page</ulink>. The + <classname>XML::XSLT</classname> distribution includes a script you can + use from the command line like this:</para> <programlisting><![CDATA[ xslt-parser -s toc-links.xsl perl-xml-faq.xml > toc.html @@ -904,13 +915,6 @@ Introduction to Perl's XML::XSLT module</ulink> at <ulink url="http://www.linuxfocus.org/">linuxfocus.org</ulink>.</para> - <para>Some people have experienced difficulty installing the latest - version of this module - possibly since maintenance has been handled by - multiple people. At the time of writing, the latest version was - <filename>J/JS/JSTOWE/XML-XSLT-0.40.tar.gz</filename> although CPAN.pm - would only find - <filename>B/BR/BRONG/XML-XSLT-0.32.tar.gz</filename>.</para> - </answer> </qandaentry> @@ -1170,7 +1174,7 @@ <qandaentry id="utf_perl_5_6"> <question> - <para>What can Perl do with a UTF8 string?</para> + <para>What can Perl do with a UTF-8 string?</para> </question> <answer> @@ -1231,34 +1235,28 @@ <qandaentry id="utf_perl_5_8"> <question> - <para>What will Perl 5.8 do with a UTF8 string?</para> + <para>What can Perl 5.8 do with a UTF-8 string?</para> </question> <answer> - <para>The Unicode support in Perl 5.6 is not complete and many of the - shortcomings will be fixed in Perl 5.8. One major leap forward in 5.8 - will be the move to Perl IO and 'layers' which will allow translations to - take place as file handles are read from or written to. A built-in - layer called ':encoding' will automatically translate data to UTF-8 as it - is read, or to some other encoding as it is written. For example, given - a UTF-8 string, this code will write it out to a file as - ISO-8859-1:</para> + <para>The Unicode support in Perl 5.6 had a number of omissions and bugs. + Many of the shortcomings were fixed in Perl 5.8 and 5.8.1. One major + leap forward in 5.8 was the move to Perl IO and 'layers' which allows + translations to take place transparently as file handles are read from or + written to. A built-in layer called ':encoding' will automatically + translate data to UTF-8 as it is read, or to some other encoding as it is + written. For example, given a UTF-8 string, this code will write it out + to a file as ISO-8859-1:</para> <programlisting><![CDATA[ -open($fh,'>:encoding(iso-8859-1)', $path) || die "open($path): $!"; +open($fh,'>:encoding(iso-8859-1)', $path) or die "open($path): $!"; $fh->print($utf_string); ]]></programlisting> - <para>File handle operations will also be applicable to in-memory 'files' - held in Perl scalars.</para> - - <para>New built-in functions will allow you to check the utf8 flag - on scalars and convert utf-8 strings to and from byte strings.</para> - - <para>The core 5.8 distribution will also include a number of new modules - in the Unicode:: namespace. Supported operations will include querying - the Unicode Character Database, sorting using Unicode collating rules - and normalising Unicode character forms.</para> + <para>The new core module 'Encode' can be used to translate between + encodings (but since that usually only makes sense during IO, you might + as well just use layers) and also provides the 'is_utf8' function for + accessing the UTF-8 flag on a string.</para> </answer> </qandaentry> @@ -1322,9 +1320,8 @@ <formalpara> <title>Perl 5.8 IO layers</title> - <para>At the time of writing this document, Perl 5.8 had not been - released but when it is you'll be able to specify an encoding - translation layer as you open a file like this:</para> + <para>You can specify an encoding translation layer as you open a file + like this:</para> </formalpara> @@ -1333,8 +1330,8 @@ $fh->print($utf_string); ]]></programlisting> - <para>You'll also be able to push an encoding layer onto an already - open filehandle like this:</para> + <para>You can also push an encoding layer onto an already open filehandle + like this:</para> <programlisting><![CDATA[ binmode(STDOUT, ':encoding(windows-1250)'); @@ -1502,13 +1499,15 @@ control characters with printable characters. For strict Latin1 text it shouldn't matter, but if your text contains 'smart quotes', daggers, bullet characters, the Trade Mark or the Euro symbols it's not - iso-8859-1.</para> + iso-8859-1. <classname>XML::Parser</classname> version 2.32 and later + include a CP1252 mapping which can be used with documents bearing this + declaration:</para> </formalpara> -<!-- - <para>FIXME: Is there a cp1252 encoding map?</para> ---> + <programlisting><![CDATA[ +<?xml version='1.0' encoding='WINDOWS-1252' ?> + ]]></programlisting> </answer> @@ -1517,27 +1516,34 @@ <formalpara> <title>Web Forms</title> - <para>If your script accepts text from a web form, you have no way of - knowing what encoding the client system was using. If you save the data - to an XML file, random high characters in the data may cause the file to - not be 'well-formed'.</para> + <para>If your Perl script accepts text from a web form, you are at the + mercy of the client browser as to what encoding is used - if you save the + data to an XML file, random high characters in the data may cause the + file to not be 'well-formed'. A common convention is for browsers to + look at the encoding on the page which contains the form and to translate + data into that encoding before posting. You declare an encoding by using + a 'charset' parameter on the Content-type declaration, either in the + header:</para> </formalpara> - <para>A good starting point is probably to include an XML declaration - which specifies iso-8859-1 encoding. By doing this, you are stating your - assumption that characters in the range 0x00-0x7F are ASCII and - characters in the range 0xA0-0xFF are Latin1. It's probably not safe to - stop there though.</para> + <programlisting><![CDATA[ +print CGI->header('text/html; charset=utf-8'); + ]]></programlisting> - <para>If the user submits characters in the range 0x80-0x9F they are - unlikely to be ISO Latin1. You can't just assume this won't happen - as it's remarkably common for users to prepare text in Microsoft - Word and copy/paste it into a web form. If they have the 'smart quotes' - option enabled, the text may contain WinLatin1 characters. The following - routine can be used to 'sanitise' the data by replacing 'smart' - characters with their common ASCII equivalents and discarding other - troublesome characters.</para> + <para>or in a meta tag in the document itself:</para> + + <programlisting><![CDATA[ +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + ]]></programlisting> + + <para>If you find you've received characters in the range 0x80-0x9F, they + are unlikely to be ISO Latin1. This commonly results from users + preparing text in Microsoft Word and copying/pasting it into a web form. + If they have the 'smart quotes' option enabled, the text may contain + WinLatin1 characters. The following routine can be used to 'sanitise' + the data by replacing 'smart' characters with their common ASCII + equivalents and discarding other troublesome characters.</para> <programlisting><![CDATA[ sub sanitise { @@ -1551,6 +1557,10 @@ } ]]></programlisting> + <para>Note: It might be safer to simply reject any input with characters + in the above range since it implies the browser ignored your charset + declaration and guessing the encoding is risky at best.</para> + </answer> </qandaentry> @@ -1571,9 +1581,9 @@ <para>These days, there are a number of alternatives to the DTD and the term validation has assumed a broader meaning than simply DTD conformance. The most visible alternative to the DTD is the W3C's own - XML Schema. <ulink - url="http://www.oasis-open.org/committees/relax-ng/">Relax NG</ulink> is - a popular alternative developed by OASIS.</para> + <ulink url="http://www.w3.org/TR/xmlschema-0/">XML Schema</ulink>. + <ulink url="http://www.oasis-open.org/committees/relax-ng/">Relax + NG</ulink> is a popular alternative developed by OASIS.</para> <para>If you design your own class of XML document, you are perfectly free to select the system for defining and validating document @@ -1689,7 +1699,21 @@ <para><classname>XML::Xerces</classname> provides a wrapper around the Apache project's Xerces parser library. Installing Xerces can be challenging and the documentation for the Perl API is not great, but it's - the only tool offering Schema validation from Perl.</para> + the most complete offering for Schema validation from Perl.</para> + + </answer> + </qandaentry> + + <qandaentry id="validation_xml_validator_schema"> + <question> + <para>W3C Schema Validation With <classname>XML::Validator::Schema</classname></para> + </question> + <answer> + + <para>Sam Tregar's <classname>XML::Validator::Schema</classname> allows + you to validate XML documents against a W3C XML Schema. It does not + implement the full W3C XML Schema recommendation, but a useful + subset.</para> </answer> </qandaentry> @@ -1947,7 +1971,7 @@ <title>Bad encoding declaration</title> <para>An incorrect or missing encoding declaration can cause this. By - default the encoding is assumed to be UTF8 so if your data is (say) + default the encoding is assumed to be UTF-8 so if your data is (say) ISO-8859-1 encoded then you must include an encoding declaration. For example:</para> @@ -1999,7 +2023,7 @@ <para>You can find the definitions for <ulink url="http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_XHTML_Latin_1_Character_Entities" - >HTML Latin 1 characters entities</ulink> on the W3C Site.</para> + >HTML Latin 1 character entities</ulink> on the W3C Site.</para> <para>You can include all these character entities into your DTD, so that you won't have to worry about it anymore:</para> |
From: Grant M. <gr...@us...> - 2003-10-14 09:11:41
|
Update of /cvsroot/perl-xml/perl-xml-faq In directory sc8-pr-cvs1:/tmp/cvs-serv26409 Modified Files: db2sdb.pl Log Message: - fixed DOCTYPE Index: db2sdb.pl =================================================================== RCS file: /cvsroot/perl-xml/perl-xml-faq/db2sdb.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- db2sdb.pl 27 Apr 2002 21:55:47 -0000 1.1 +++ db2sdb.pl 14 Oct 2003 09:11:30 -0000 1.2 @@ -134,9 +134,9 @@ my $data = shift; $data->{PublicId} = $main::opt{p} || - '-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN'; + '-//OASIS//DTD Simplified DocBook XML V1.0//EN'; $data->{SystemId} = $main::opt{s} || - 'file:///usr/share/xml/docbook/simple/4.1.2.5/sdocbook.dtd'; + 'http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd'; $self->SUPER::start_dtd($data); } |
From: Ilya M. <m_...@us...> - 2003-09-22 09:01:58
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv23676 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/Changes,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Changes 29 May 2003 14:29:16 -0000 1.11 +++ Changes 22 Sep 2003 08:02:26 -0000 1.12 @@ -2,7 +2,7 @@ Revision history for Perl module XML::LibXML::XPathContext. -Changes after 0.04 +0.05 Mon Sep 22 2003 * lookupNs() method added |
From: Ilya M. <m_...@us...> - 2003-09-22 08:10:50
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv23734 Modified Files: XPathContext.pm Log Message: New version Index: XPathContext.pm =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- XPathContext.pm 25 Jul 2003 12:50:20 -0000 1.29 +++ XPathContext.pm 22 Sep 2003 08:02:56 -0000 1.30 @@ -7,7 +7,7 @@ use XML::LibXML::NodeList; -$VERSION = '0.04'; +$VERSION = '0.05'; require DynaLoader; @ISA = qw(DynaLoader); |
From: Ilya M. <m_...@us...> - 2003-09-22 08:10:19
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext/t In directory sc8-pr-cvs1:/tmp/cvs-serv24533/t Modified Files: 00-xpathcontext.t Log Message: Fix 'my" variable $doc masks earlier declaration in same scope' warning Index: 00-xpathcontext.t =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/t/00-xpathcontext.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- 00-xpathcontext.t 21 Sep 2003 10:07:08 -0000 1.10 +++ 00-xpathcontext.t 22 Sep 2003 08:08:03 -0000 1.11 @@ -91,7 +91,7 @@ # testcase for segfault found by Steve Hay my $xc5 = XML::LibXML::XPathContext->new(); $xc5->registerNs('pfx', 'http://www.foo.com'); -my $doc = XML::LibXML->new->parse_string('<foo xmlns="http://www.foo.com" />'); +$doc = XML::LibXML->new->parse_string('<foo xmlns="http://www.foo.com" />'); $xc5->setContextNode($doc); $xc5->findnodes('/'); $xc5->setContextNode(undef); |
From: Ilya M. <m_...@us...> - 2003-09-22 08:10:16
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv24872 Modified Files: MANIFEST Added Files: META.yml Log Message: Add autogenerated META.yml --- NEW FILE: META.yml --- # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: XML-LibXML-XPathContext version: 0.05 version_from: XPathContext.pm installdirs: site requires: XML::LibXML: 1.51 distribution_type: module generated_by: ExtUtils::MakeMaker version 6.15 Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/MANIFEST,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MANIFEST 26 Mar 2003 21:25:12 -0000 1.4 +++ MANIFEST 22 Sep 2003 08:09:34 -0000 1.5 @@ -18,3 +18,4 @@ typemap xpath.c xpath.h +META.yml Module meta-data (added by MakeMaker) |
From: Ilya M. <m_...@us...> - 2003-09-21 10:07:12
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext/t In directory sc8-pr-cvs1:/tmp/cvs-serv29775/t Modified Files: 00-xpathcontext.t Log Message: Correct test case: lookupNs should return NS url Index: 00-xpathcontext.t =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/t/00-xpathcontext.t,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- 00-xpathcontext.t 29 May 2003 14:28:28 -0000 1.9 +++ 00-xpathcontext.t 21 Sep 2003 10:07:08 -0000 1.10 @@ -38,7 +38,7 @@ my $xc = XML::LibXML::XPathContext->new($doc1); $xc->registerNs('xxx', 'http://example.com/foobar'); ok($xc->findnodes('/xxx:foo')->pop->nodeName eq 'foo'); -ok($xc->lookupNs('xxx') eq '/xxx:foo'); +ok($xc->lookupNs('xxx') eq 'http://example.com/foobar'); # test unregisterNs() $xc->unregisterNs('xxx'); |
From: Ilya M. <m_...@us...> - 2003-09-21 10:05:10
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv29454 Modified Files: XPathContext.xs Log Message: Fix compilation errors: PPCODE must be last thing in XPathContext.xs, line 579 and XPathContext.xs: In function `XS_XML__LibXML__XPathContext_lookupNs': XPathContext.xs:578: too few arguments to function `xpc_C2Sv' Index: XPathContext.xs =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.xs,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- XPathContext.xs 29 May 2003 14:28:29 -0000 1.35 +++ XPathContext.xs 21 Sep 2003 10:05:05 -0000 1.36 @@ -514,7 +514,7 @@ } else { RETVAL = &PL_sv_undef; } -OUTPUT: + OUTPUT: RETVAL void @@ -574,8 +574,8 @@ croak("XPathContext: missing xpath context"); } xpc_LibXML_configure_xpathcontext(ctxt); - PPCODE: - RETVAL = xpc_C2Sv(xmlXPathNsLookup(ctxt, SvPV_nolen(prefix))); + CODE: + RETVAL = xpc_C2Sv(xmlXPathNsLookup(ctxt, SvPV_nolen(prefix)), NULL); OUTPUT: RETVAL @@ -603,11 +603,8 @@ } else { RETVAL = &PL_sv_undef; } - OUTPUT: RETVAL - - void registerVarLookupFunc( pxpath_context, lookup_func, lookup_data ) |
From: Grant M. <gr...@us...> - 2003-09-09 09:37:45
|
Update of /cvsroot/perl-xml/xml-simple/t In directory sc8-pr-cvs1:/tmp/cvs-serv31773/t Modified Files: 1_XMLin.t Log Message: - for release 2.09 Index: 1_XMLin.t =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/t/1_XMLin.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- 1_XMLin.t 13 Jun 2003 10:27:20 -0000 1.15 +++ 1_XMLin.t 9 Sep 2003 09:37:41 -0000 1.16 @@ -25,8 +25,8 @@ $@ = ''; eval "use XML::Simple;"; is($@, '', 'Module compiled OK'); -unless($XML::Simple::VERSION eq '2.08') { - diag("Warning: XML::Simple::VERSION = $XML::Simple::VERSION (expected 2.08)"); +unless($XML::Simple::VERSION eq '2.09') { + diag("Warning: XML::Simple::VERSION = $XML::Simple::VERSION (expected 2.09)"); } |
From: Grant M. <gr...@us...> - 2003-09-09 09:37:45
|
Update of /cvsroot/perl-xml/xml-simple In directory sc8-pr-cvs1:/tmp/cvs-serv31773 Modified Files: Changes README Log Message: - for release 2.09 Index: Changes =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/Changes,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Changes 13 Jun 2003 10:28:38 -0000 1.13 +++ Changes 9 Sep 2003 09:37:41 -0000 1.14 @@ -1,5 +1,12 @@ Revision history for Perl module XML::Simple +2.09 Sep 09 2003 + - Makefile.PL makeover contributed by Joshua Keroes + - fixed hash ordering assumption in test script (reported by Michel + Rodriguez) + - POD updates + - updated link to Perl XML FAQ + 2.08 Jun 13 2003 - fixed variable expansion not happening in attributes (patch from Paul Bussé) Index: README =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/README,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- README 13 Jun 2003 10:28:37 -0000 1.13 +++ README 9 Sep 2003 09:37:41 -0000 1.14 @@ -56,12 +56,15 @@ STATUS - This version (2.08) is the current stable release. + This version (2.09) is the current stable release. Please send any feedback to the author: gr...@cp... NEW IN THIS RELEASE + - test fixes and POD updates + + New in Version 2.08 - fixed bug - no variable expansion in attributes (patch from Paul Bussé) New in Version 2.07 |
From: Grant M. <gr...@us...> - 2003-09-09 09:37:19
|
Update of /cvsroot/perl-xml/xml-simple In directory sc8-pr-cvs1:/tmp/cvs-serv31720 Modified Files: Makefile.PL Log Message: - complete rewrite in the hope of getting CPAN.pm to see XML::SAX as a prerequisite if no parser installed Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/Makefile.PL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.PL 8 Dec 2002 04:06:30 -0000 1.5 +++ Makefile.PL 9 Sep 2003 09:37:15 -0000 1.6 @@ -2,73 +2,41 @@ use ExtUtils::MakeMaker; -my $parser_count = 0; -my $fatal = 0; - -print "Checking for required modules ...\n"; - -eval { require XML::SAX }; -if($@) { - print "XML::SAX is not installed\n"; -} -else { - print "XML::SAX is installed ... good\n"; - $parser_count++; - - eval { require XML::NamespaceSupport }; - if($@) { - print "XML::NamespaceSupport is not installed ... this is required only for generating XML with namespace declarations\n"; - } - else { - if($XML::NamespaceSupport::VERSION < 1.04) { - print "You must upgrade XML::NamespaceSupport to version 1.04 or better\n"; - $fatal++; - } - else { - print "XML::NamespaceSupport is installed ... good\n"; - } - } +my $make_params = { + 'NAME' => 'XML::Simple', + 'VERSION_FROM' => 'lib/XML/Simple.pm', + 'DISTNAME' => 'XML-Simple', + 'PREREQ_PM' => { + Test::Simple => 0.41, + }, + 'dist' => { COMPRESS => 'gzip --best', SUFFIX => 'gz' }, + ($] >= 5.005 ? ( + 'AUTHOR' => 'Grant McLean <gr...@cp...>', + 'ABSTRACT_FROM' => 'lib/XML/Simple.pm', + ) : () ) +}; -} +print "Checking installed modules ...\n"; -eval { require XML::Parser }; -if($@) { - print "XML::Parser is not installed\n"; +if ( eval { require XML::SAX } && ! $@ ) { + print "XML::SAX is installed, it will be used by the test suite\n"; + $make_params->{PREREQ_PM}->{'XML::SAX'} = 0; + $make_params->{PREREQ_PM}->{'XML::NamespaceSupport'} = 1.04; } +elsif ( eval { require XML::Parser } && ! $@ ) { + print "XML::Parser is installed, it will be used by the test suite\n"; + $make_params->{PREREQ_PM}->{'XML::Parser'} = 0; +} else { - print "XML::Parser is installed ... good\n"; - $parser_count++; + print "You don't have either XML::SAX or XML::Parser installed!\n"; + $make_params->{PREREQ_PM}->{'XML::SAX'} = 0; + $make_params->{PREREQ_PM}->{'XML::NamespaceSupport'} = 1.04; } eval { require Storable }; if($@) { print "Storable is not installed ... caching functions will not be available\n"; } -else { - print "Storable is installed ... good\n"; -} - - -unless($parser_count) { - print "You must install either XML::SAX or XML::Parser before XML::Simple\n"; - $fatal++; -} -if($fatal) { - print "You must correct the above problems before XML::Simple can be installed\n"; - exit(1); -} -WriteMakefile( - 'NAME' => 'XML::Simple', - 'VERSION_FROM' => 'lib/XML/Simple.pm', - 'DISTNAME' => 'XML-Simple', - 'PREREQ_PM' => { - Test::Simple => 0.41, - }, - 'dist' => { COMPRESS => 'gzip --best', SUFFIX => 'gz' }, - ($] >= 5.005 ? ( - 'AUTHOR' => 'Grant McLean <gr...@cp...>', - 'ABSTRACT_FROM' => 'lib/XML/Simple.pm', - ) : () ) -); +WriteMakefile(%$make_params); |
From: Grant M. <gr...@us...> - 2003-09-09 09:35:55
|
Update of /cvsroot/perl-xml/xml-simple/t In directory sc8-pr-cvs1:/tmp/cvs-serv31499/t Modified Files: 2_XMLout.t Log Message: - fixed test bug re hash ordering assumption Index: 2_XMLout.t =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/t/2_XMLout.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- 2_XMLout.t 18 May 2003 08:42:30 -0000 1.8 +++ 2_XMLout.t 9 Sep 2003 09:35:52 -0000 1.9 @@ -326,8 +326,11 @@ ok(defined($_), 'repetitive (non-circular) data structure not fatal'); like($_, qr{^ <opt> - \s*<a\s+alpha="1"\s*/> - \s*<b\s+alpha="1"\s*/> + ( + \s*<a\s+alpha="1"\s*/> + | + \s*<b\s+alpha="1"\s*/> + ){2} \s*</opt> }xs, 'and encodes as expected'); |
From: Grant M. <gr...@us...> - 2003-09-09 09:35:14
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML/Simple In directory sc8-pr-cvs1:/tmp/cvs-serv31417/lib/XML/Simple Modified Files: FAQ.pod Log Message: - fixed link to Perl XML FAQ - added Q+A re deprecation of ParserOpts option Index: FAQ.pod =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple/FAQ.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- FAQ.pod 13 Jun 2003 10:28:05 -0000 1.4 +++ FAQ.pod 9 Sep 2003 09:35:11 -0000 1.5 @@ -126,7 +126,7 @@ If you're looking for a recommendation, I'd suggest you look at the Perl-XML FAQ at: - http://www.perlxml.net/perl-xml-faq.dkb + http://perl-xml.sourceforge.net/faq/ =head1 Installation @@ -623,6 +623,23 @@ If you would prefer empty elements to be represented as empty strings or the undefined value, set the 'suppressempty' option to '' or undef respectively. + +=head2 Why is ParserOpts deprecated? + +The C<ParserOpts> option is a remnant of the time when XML::Simple only worked +with the XML::Parser API. Its value is completely ignored if you're using a +SAX parser, so writing code which relied on it would bar you from taking +advantage of SAX. + +Even if you are using XML::Parser, it is seldom necessary to pass options to +the parser object. A number of people have written to say they use this option +to set XML::Parser's C<ProtocolEncoding> option. Don't do that, it's wrong, +Wrong, WRONG! Fix the XML document so that it's well-formed and you won't have +a problem. + +Having said all of that, as long as XML::Simple continues to support the +XML::Parser API, this option will not be removed. There are currently no plans +to remove support for the XML::Parser API. =cut |
From: Grant M. <gr...@us...> - 2003-09-09 09:33:57
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML In directory sc8-pr-cvs1:/tmp/cvs-serv31166/lib/XML Modified Files: Simple.pm Log Message: - POD updates Index: Simple.pm =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Simple.pm 13 Jun 2003 10:27:20 -0000 1.15 +++ Simple.pm 9 Sep 2003 09:33:43 -0000 1.16 @@ -53,7 +53,7 @@ @ISA = qw(Exporter); @EXPORT = qw(XMLin XMLout); @EXPORT_OK = qw(xml_in xml_out); -$VERSION = '2.08'; +$VERSION = '2.09'; $PREFERRED_PARSER = undef; my $StrictMode = 0; @@ -1810,29 +1810,38 @@ =back -Both C<XMLin()> and C<XMLout()> expect a single argument followed by a list of -options. An option takes the form of a 'name => value' pair. The options -listed below are marked with 'B<in>' if they are recognised by C<XMLin()> and -'B<out>' if they are recognised by C<XMLout()>. +The option name headings below have a trailing 'comment' - a hash followed by +two pieces of metadata: + +=over 4 + +=item * + +Options are marked with 'I<in>' if they are recognised by C<XMLin()> and +'I<out>' if they are recognised by C<XMLout()>. + +=item * Each option is also flagged to indicate whether it is: - 'important' - don't use the module until you understand this + 'important' - don't use the module until you understand this one 'handy' - you can skip this on the first time through 'advanced' - you can skip this on the second time through - 'SAX only' - don't worry about this unless you're using SAX + 'SAX only' - don't worry about this unless you're using SAX (or + alternatively if you need this, you also need SAX) 'seldom used' - you'll probably never use this unless you were the person that requested the feature +=back + The options are listed alphabetically: Note: option names are no longer case sensitive so you can use the mixed case versions shown here; all lower case as required by versions 2.03 and earlier; or you can add underscores between the words (eg: key_attr). -=over 4 -=item Cache => [ cache scheme(s) ] (B<in>) (B<advanced>) +=head2 Cache => [ cache schemes ] I<# in - advanced> Because loading the B<XML::Parser> module and parsing an XML file can consume a significant number of CPU cycles, it is often desirable to cache the output of @@ -1882,7 +1891,7 @@ synchronised with the clock where your script is run, updates to the source XML file may appear to be ignored. -=item ContentKey => 'keyname' (B<in+out>) (B<seldom used>) +=head2 ContentKey => 'keyname' I<# in+out - seldom used> When text content is parsed to a hash value, this option let's you specify a name for the hash key to override the default 'content'. So for example: @@ -1929,7 +1938,7 @@ } } -=item DataHandler => code_ref (B<in>) (B<SAX only>) +=head2 DataHandler => code_ref I<# in - SAX only> When you use an B<XML::Simple> object as a SAX handler, it will return a 'simple tree' data structure in the same format as C<XMLin()> would return. If @@ -1939,7 +1948,7 @@ the subroutine will be returned to the SAX driver. (See L<"SAX SUPPORT"> for more details). -=item ForceArray => 1 (B<in>) (B<IMPORTANT!>) +=head2 ForceArray => 1 I<# in - important> This option should be set to '1' to force nested elements to be represented as arrays even when there is only one. Eg, with ForceArray enabled, this @@ -1973,7 +1982,7 @@ the default value of 'KeyAttr' enables array folding, the default value of this option should probably also have been enabled too - sorry). -=item ForceArray => [ name(s) ] (B<in>) (B<IMPORTANT!>) +=head2 ForceArray => [ names ] I<# in - important> This alternative (and preferred) form of the 'ForceArray' option allows you to specify a list of element names which should always be forced into an array @@ -1986,7 +1995,7 @@ ForceArray => qr/_list$/ -=item ForceContent => 1 (B<in>) (B<seldom used>) +=head2 ForceContent => 1 I<# in - seldom used> When C<XMLin()> parses elements which have text content as well as attributes, the text content must be represented as a hash value rather than a simple @@ -2009,7 +2018,7 @@ 'y' => { 'a' => 2, 'content' => 'text2' } } -=item GroupTags => { grouping tag => grouped tag } (B<in+out>) (B<handy>) +=head2 GroupTags => { grouping tag => grouped tag } I<# in+out - handy> You can use this option to eliminate extra levels of indirection in your Perl data structure. For example this XML: @@ -2049,7 +2058,7 @@ the 'grouping tag' name occurs - you probably don't want to use the same name for elements as well as attributes. -=item Handler => object_ref (B<out>) (B<SAX only>) +=head2 Handler => object_ref I<# out - SAX only> Use the 'Handler' option to have C<XMLout()> generate SAX events rather than returning a string of XML. For more details see L<"SAX SUPPORT"> below. @@ -2062,7 +2071,7 @@ supply. A future implementation of this option may generate the events directly. -=item KeepRoot => 1 (B<in+out>) (B<handy>) +=head2 KeepRoot => 1 I<# in+out - handy> In its attempt to return a data structure free of superfluous detail and unnecessary levels of indirection, C<XMLin()> normally discards the root @@ -2079,7 +2088,7 @@ data structure already contains a root element name and it is not necessary to add another. -=item KeyAttr => [ list ] (B<in+out>) (B<IMPORTANT!>) +=head2 KeyAttr => [ list ] I<# in+out - important> This option controls the 'array folding' feature which translates nested elements from an array to a hash. It also controls the 'unfolding' of hashes @@ -2135,7 +2144,7 @@ rolled up into a scalar rather than an array and therefore will not be folded (since only arrays get folded). -=item KeyAttr => { list } (B<in+out>) (B<IMPORTANT!>) +=head2 KeyAttr => { list } I<# in+out - important> This alternative (and preferred) method of specifiying the key attributes allows more fine grained control over which elements are folded and on which @@ -2193,64 +2202,54 @@ As described earlier, C<XMLout> will ignore hash keys starting with a '-'. -=item NoAttr => 1 (B<in+out>) (B<handy>) +=head2 NoAttr => 1 I<# in+out - handy> When used with C<XMLout()>, the generated XML will contain no attributes. All hash key/values will be represented as nested elements instead. When used with C<XMLin()>, any attributes in the XML will be ignored. -=item NormaliseSpace => 0 | 1 | 2 (B<in>) (B<handy>) +=head2 NormaliseSpace => 0 | 1 | 2 I<# in - handy> This option controls how whitespace in text content is handled. Recognised values for the option are: =over 4 -=item 0 +=item * -the default behaviour is for whitespace to be passed through unaltered (except -of course for the normalisation of whitespace in attribute values which is -mandated by the XML recommendation) +0 = (default) whitespace is passed through unaltered (except of course for the +normalisation of whitespace in attribute values which is mandated by the XML +recommendation) -=item 1 +=item * -whitespace is normalised in any value used as a hash key (normalising means +1 = whitespace is normalised in any value used as a hash key (normalising means removing leading and trailing whitespace and collapsing sequences of whitespace characters to a single space) -=item 2 +=item * -whitespace is normalised in all text content +2 = whitespace is normalised in all text content =back Note: you can spell this option with a 'z' if that is more natural for you. -=item RootName => 'string' (B<out>) (B<handy>) - -By default, when C<XMLout()> generates XML, the root element will be named -'opt'. This option allows you to specify an alternative name. - -Specifying either undef or the empty string for the RootName option will -produce XML with no root elements. In most cases the resulting XML fragment -will not be 'well formed' and therefore could not be read back in by C<XMLin()>. -Nevertheless, the option has been found to be useful in certain circumstances. - -=item NoEscape => 1 (B<out>) (B<seldom used>) +=head2 NoEscape => 1 I<# out - seldom used> By default, C<XMLout()> will translate the characters 'E<lt>', 'E<gt>', '&' and '"' to '<', '>', '&' and '"' respectively. Use this option to suppress escaping (presumably because you've already escaped the data in some more sophisticated manner). -=item NoIndent => 1 (B<out>) (B<seldom used>) +=head2 NoIndent => 1 I<# out - seldom used> Set this option to 1 to disable C<XMLout()>'s default 'pretty printing' mode. With this option enabled, the XML output will all be on one line (unless there are newlines in the data) - this may be easier for downstream processing. -=item NSExpand => 1 (B<in+out>) (B<handy - SAX only>) +=head2 NSExpand => 1 I<# in+out handy - SAX only> This option controls namespace expansion - the translation of element and attribute names of the form 'prefix:name' to '{uri}name'. For example the @@ -2272,24 +2271,33 @@ I<Note: You must have the XML::NamespaceSupport module installed if you want C<XMLout()> to translate URIs back to prefixes>. -=item OutputFile => <file specifier> (B<out>) (B<handy>) +=head2 OutputFile => <file specifier> I<# out - handy> The default behaviour of C<XMLout()> is to return the XML as a string. If you wish to write the XML to a file, simply supply the filename using the 'OutputFile' option. Alternatively, you can supply an IO handle object instead of a filename. -=item ParserOpts => [ XML::Parser Options ] (B<in>) (B<don't use this>) +=head2 ParserOpts => [ XML::Parser Options ] I<# in - don't use this> I<Note: This option is now officially deprecated. If you find it useful, email the author with an example of what you use it for. Do not use this option to set the ProtocolEncoding, that's just plain wrong - fix the XML>. -Use this option to specify parameters that should be passed to the constructor -of the underlying XML::Parser object (which of course assumes you're not using -SAX). +This option allows you to pass parameters to the constructor of the underlying +XML::Parser object (which of course assumes you're not using SAX). -=item SearchPath => [ list ] (B<in>) (B<handy>) +=head2 RootName => 'string' I<# out - handy> + +By default, when C<XMLout()> generates XML, the root element will be named +'opt'. This option allows you to specify an alternative name. + +Specifying either undef or the empty string for the RootName option will +produce XML with no root elements. In most cases the resulting XML fragment +will not be 'well formed' and therefore could not be read back in by C<XMLin()>. +Nevertheless, the option has been found to be useful in certain circumstances. + +=head2 SearchPath => [ list ] I<# in - handy> If you pass C<XMLin()> a filename, but the filename include no directory component, you can use this option to specify which directories should be @@ -2303,7 +2311,7 @@ will contain only the directory in which the script itself is located. Otherwise the default SearchPath will be empty. -=item SuppressEmpty => 1 | '' | undef (B<in> + B<out>) (B<handy>) +=head2 SuppressEmpty => 1 | '' | undef I<# in+out - handy> This option controls what C<XMLin()> should do with empty elements (no attributes and no content). The default behaviour is to represent them as @@ -2317,7 +2325,7 @@ Setting the option to undef causes undefined values to be output as empty elements (rather than empty attributes). -=item Variables => { name => value } (B<in>) (B<handy>) +=head2 Variables => { name => value } I<# in - handy> This option allows variables in the XML to be expanded when the file is read. (there is no facility for putting the variable names back if you regenerate @@ -2328,7 +2336,7 @@ supplied hashref, C<${name}> will be replaced with the corresponding value from the hashref. If no matching key is found, the variable will not be replaced. -=item VarAttr => 'attr_name' (B<in>) (B<handy>) +=head2 VarAttr => 'attr_name' I<# in - handy> In addition to the variables defined using C<Variables>, this option allows variables to be defined in the XML. A variable definition consists of an @@ -2356,7 +2364,7 @@ } } -=item XMLDecl => 1 or XMLDecl => 'string' (B<out>) (B<handy>) +=head2 XMLDecl => 1 or XMLDecl => 'string' I<# out - handy> If you want the output from C<XMLout()> to start with the optional XML declaration, simply set the option to '1'. The default XML declaration is: @@ -2367,8 +2375,6 @@ the value of this option to the complete string you require. -=back - =head1 OPTIONAL OO INTERFACE The procedural interface is both simple and convenient however there are a @@ -2427,7 +2433,7 @@ =item * Failing to explicitly set the C<KeyAttr> option - if you can't be bothered -reading about this option, turn it off with: KeyAttr => [] +reading about this option, turn it off with: KeyAttr => [ ] =item * @@ -2794,7 +2800,7 @@ In a serious XML project, you'll probably outgrow these assumptions fairly quickly. This section of the document used to offer some advice on chosing a more powerful option. That advice has now grown into the 'Perl-XML FAQ' -document which you can find at: L<http://www.perlxml.net/perl-xml-faq.dkb> +document which you can find at: L<http://perl-xml.sourceforge.net/faq/> The advice in the FAQ boils down to a quick explanation of tree versus event based parsers and then recommends: @@ -2809,7 +2815,7 @@ =head1 STATUS -This version (2.08) is the current stable version. +This version (2.09) is the current stable version. =head1 SEE ALSO |
From: Ilya M. <m_...@us...> - 2003-07-25 12:51:06
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv5231 Modified Files: README Log Message: Regenerated Index: README =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/README,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- README 21 May 2003 15:33:44 -0000 1.5 +++ README 25 Jul 2003 12:51:03 -0000 1.6 @@ -11,13 +11,15 @@ $xc->setContextNode($node); $xc->registerNs($prefix, $namespace_uri); + $xc->unregisterNs($prefix); + my $namespace_uri = $xc->lookupNs($prefix); + $xc->registerFunction($name, sub { ... }); $xc->registerFunctionNS($name, $namespace_uri, sub { ... }); - $xc->registerVarLookupFunc(sub { ... }, $data); - - $xc->unregisterNs($prefix); $xc->unregisterFunction($name); $xc->unregisterFunctionNS($name, $namespace_uri); + + $xc->registerVarLookupFunc(sub { ... }, $data); $xc->unregisterVarLookupFunc($name); my @nodes = $xc->findnodes($xpath); @@ -108,6 +110,10 @@ unregisterNs($prefix) Unregisters namespace *$prefix*. + + lookupNs($prefix) + Returns namespace URI registered with *$prefix*. If *$prefix* is not + registered to any namespace URI returns "undef". registerVarLookupFunc($callback, $data) Registers variable lookup function *$prefix*. The registered |
From: Ilya M. <m_...@us...> - 2003-07-25 12:50:26
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv5116 Modified Files: XPathContext.pm Log Message: Add documentation for lookupNs Index: XPathContext.pm =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- XPathContext.pm 29 May 2003 14:28:29 -0000 1.28 +++ XPathContext.pm 25 Jul 2003 12:50:20 -0000 1.29 @@ -148,13 +148,15 @@ $xc->setContextNode($node); $xc->registerNs($prefix, $namespace_uri); + $xc->unregisterNs($prefix); + my $namespace_uri = $xc->lookupNs($prefix); + $xc->registerFunction($name, sub { ... }); $xc->registerFunctionNS($name, $namespace_uri, sub { ... }); - $xc->registerVarLookupFunc(sub { ... }, $data); - - $xc->unregisterNs($prefix); $xc->unregisterFunction($name); $xc->unregisterFunctionNS($name, $namespace_uri); + + $xc->registerVarLookupFunc(sub { ... }, $data); $xc->unregisterVarLookupFunc($name); my @nodes = $xc->findnodes($xpath); @@ -166,8 +168,6 @@ my $value = $xc->findvalue($xpath); my $value = $xc->findvalue($xpath, $context_node); - my $namespace_uri = $xc->lookupNs($prefix); - =head1 DESCRIPTION @@ -271,6 +271,11 @@ =item B<unregisterNs($prefix)> Unregisters namespace I<$prefix>. + +=item B<lookupNs($prefix)> + +Returns namespace URI registered with I<$prefix>. If I<$prefix> is not +registered to any namespace URI returns C<undef>. =item B<registerVarLookupFunc($callback, $data)> |
From: Grant M. <gr...@us...> - 2003-06-13 10:28:40
|
Update of /cvsroot/perl-xml/xml-simple In directory sc8-pr-cvs1:/tmp/cvs-serv26227 Modified Files: README Changes Log Message: - for release 2.08 Index: README =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/README,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- README 20 May 2003 08:50:09 -0000 1.12 +++ README 13 Jun 2003 10:28:37 -0000 1.13 @@ -56,54 +56,18 @@ STATUS - This version (2.06) is the current stable release. + This version (2.08) is the current stable release. Please send any feedback to the author: gr...@cp... NEW IN THIS RELEASE + - fixed bug - no variable expansion in attributes (patch from Paul Bussé) + + New in Version 2.07 - fixed bug which broke compatibility with Perl 5.005_03 - fixed test problems with Storable - New in Version 2.06 - - bug fix for strict mode requiring ForceArray on output - - New in Version 2.05 - - fixed warnings when NormaliseSpace undefined (reported by Peter - Scott and others) - - added support for specifying ForceArray using regular expressions - (patch from Jim Cromie) - - added check to escape_value to guard against undefined argument - (reported by Henrik Gemal) - - added NoIndent option (requested by Afroze Husain Zubairi) - - - New in Version 2.04 - - new 'GroupTags' option (patch from Michel Rodriguez) - - optionally collapse 'content' hashes to scalars after folding - (also from Michel) - - new variable substitution facility via 'Variables' and 'VarAttr' - options (Michel again) - - new 'NormaliseSpace' option (suggested by Alex Manoussakis) - - option names are no longer case-sensitive and can include '_' - - XMLin() and XMLout() aliased to xml_in() and xml_out() - - New in Version 2.03 - - fixed circular reference check which was incorrectly catching - 'parallel' references (patch from Theo Lengyel) - - New in Version 2.02: - - changed Storable calls to use locking - - New in Version 2.01: - - fixed bug whereby :strict mode required forcearray on XMLout() - - New in Version 2.00: - - First production release with SAX support - - Added support for 'strict mode' to catch common mistakes - - Removed locking code (as it was incompatible with iThreads) - - POD updates - - Added (updated) FAQ document to distribution See 'Changes' for a detailed history. Index: Changes =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/Changes,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Changes 20 May 2003 08:50:09 -0000 1.12 +++ Changes 13 Jun 2003 10:28:38 -0000 1.13 @@ -1,13 +1,17 @@ Revision history for Perl module XML::Simple +2.08 Jun 13 2003 + - fixed variable expansion not happening in attributes (patch from Paul + Bussé) + 2.07 May 20 2003 - added test to catch old versions of Storable which lack locking support - removed new-style loop which broke on 5.005_03 - suppress more uninitialised variable warnings 2.06 May 18 2003 - - fixed strict mode requiring ForceArray on output (fix from Igor Roman - Marino) + - fixed strict mode requiring ForceArray on output (fix from Igor Román + Mariño) - fixed warnings about uninitialised values - minor POD update (link to FAQ) |
From: Grant M. <gr...@us...> - 2003-06-13 10:28:09
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML/Simple In directory sc8-pr-cvs1:/tmp/cvs-serv25973/lib/XML/Simple Modified Files: FAQ.pod Log Message: - address/URL updates Index: FAQ.pod =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple/FAQ.pod,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FAQ.pod 13 Oct 2002 01:32:55 -0000 1.3 +++ FAQ.pod 13 Jun 2003 10:28:05 -0000 1.4 @@ -148,7 +148,8 @@ perl -MCPAN -e 'install XML::Simple' If that doesn't work, download the latest distribution from -http://web.co.nz/~grantm/cpan/ , unpack it and run these commands: +ftp://ftp.cpan.org/pub/CPAN/authors/id/G/GR/GRANTM , unpack it and run these +commands: perl Makefile.PL make @@ -160,9 +161,9 @@ ppm install XML::Simple -If that doesn't work, you really only need the Simple.pm file, so grab it -from the above site and save it in the \site\lib\XML directory under your -Perl installation (typically C:\Perl). +If that doesn't work, you really only need the Simple.pm file, so extract it +from the .tar.gz file (eg: using WinZIP) and save it in the \site\lib\XML +directory under your Perl installation (typically C:\Perl). =head2 I'm trying to install XML::Simple and 'make test' fails |
From: Grant M. <gr...@us...> - 2003-06-13 10:27:25
|
Update of /cvsroot/perl-xml/xml-simple/lib/XML In directory sc8-pr-cvs1:/tmp/cvs-serv25613/lib/XML Modified Files: Simple.pm Log Message: - patch for no variable expansion in attributes Index: Simple.pm =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Simple.pm 20 May 2003 08:46:12 -0000 1.14 +++ Simple.pm 13 Jun 2003 10:27:20 -0000 1.15 @@ -53,7 +53,7 @@ @ISA = qw(Exporter); @EXPORT = qw(XMLin XMLout); @EXPORT_OK = qw(xml_in xml_out); -$VERSION = '2.07'; +$VERSION = '2.08'; $PREFERRED_PARSER = undef; my $StrictMode = 0; @@ -878,6 +878,16 @@ } + # Do variable substitutions + + if(my $var = $self->{_var_values}) { + while(my($key, $val) = each(%$attr)) { + $val =~ s{\$\{(\w+)\}}{ $self->get_var($1) }ge; + $attr->{$key} = $val; + } + } + + # Add any nested elements my($key, $val); @@ -2799,7 +2809,7 @@ =head1 STATUS -This version (2.07) is the current stable version. +This version (2.08) is the current stable version. =head1 SEE ALSO |
From: Grant M. <gr...@us...> - 2003-06-13 10:27:24
|
Update of /cvsroot/perl-xml/xml-simple/t In directory sc8-pr-cvs1:/tmp/cvs-serv25613/t Modified Files: 1_XMLin.t Log Message: - patch for no variable expansion in attributes Index: 1_XMLin.t =================================================================== RCS file: /cvsroot/perl-xml/xml-simple/t/1_XMLin.t,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- 1_XMLin.t 20 May 2003 08:49:31 -0000 1.14 +++ 1_XMLin.t 13 Jun 2003 10:27:20 -0000 1.15 @@ -25,8 +25,8 @@ $@ = ''; eval "use XML::Simple;"; is($@, '', 'Module compiled OK'); -unless($XML::Simple::VERSION eq '2.07') { - diag("Warning: XML::Simple::VERSION = $XML::Simple::VERSION (expected 2.07)"); +unless($XML::Simple::VERSION eq '2.08') { + diag("Warning: XML::Simple::VERSION = $XML::Simple::VERSION (expected 2.08)"); } @@ -980,6 +980,7 @@ <file name="config_file">${conf_dir}/appname.conf</file> <file name="log_file">${log_dir}/appname.log</file> <file name="debug_file">${log_dir}/appname.dbg</file> + <opt docs="${have_docs}" /> </opt>); $opt = XMLin($xml, contentkey => '-content'); @@ -988,7 +989,8 @@ config_file => '${conf_dir}/appname.conf', log_file => '${log_dir}/appname.log', debug_file => '${log_dir}/appname.dbg', - } + }, + opt => { docs => '${have_docs}' } }, 'undefined variables are left untouched'); @@ -996,14 +998,16 @@ $opt = XMLin($xml, contentkey => '-content', - variables => { conf_dir => '/etc', log_dir => '/var/log' } + variables => { conf_dir => '/etc', log_dir => '/var/log', + have_docs => 'true' } ); is_deeply($opt, { file => { config_file => '/etc/appname.conf', log_file => '/var/log/appname.log', debug_file => '/var/log/appname.dbg', - } + }, + opt => { docs => 'true' } }, 'substitution of pre-defined variables works'); @@ -1012,9 +1016,11 @@ $xml = q(<opt> <dir xsvar="conf_dir">/etc</dir> <dir xsvar="log_dir">/var/log</dir> + <cfg xsvar="have_docs">false</cfg> <file name="config_file">${conf_dir}/appname.conf</file> <file name="log_file">${log_dir}/appname.log</file> <file name="debug_file">${log_dir}/appname.dbg</file> + <opt docs="${have_docs}" /> </opt>); $opt = XMLin($xml, contentkey => '-content', varattr => 'xsvar'); @@ -1024,10 +1030,12 @@ log_file => '/var/log/appname.log', debug_file => '/var/log/appname.dbg', }, + opt => { docs => 'false' }, dir => [ { xsvar => 'conf_dir', content => '/etc' }, { xsvar => 'log_dir', content => '/var/log' }, - ] + ], + cfg => { xsvar => 'have_docs', content => 'false' }, }, 'variables defined in XML work'); |
From: Christian G. <phi...@us...> - 2003-05-30 18:48:40
|
Update of /cvsroot/perl-xml/XML-LibXML-Common In directory sc8-pr-cvs1:/tmp/cvs-serv26269 Modified Files: Common.xs Log Message: Modified Files: Common.xs [fix] reported memory leak in decodeFromUTF8() Index: Common.xs =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-Common/Common.xs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Common.xs 15 Mar 2003 20:55:32 -0000 1.6 +++ Common.xs 30 May 2003 18:39:22 -0000 1.7 @@ -210,6 +210,7 @@ } RETVAL = newSVpvn( (const char *)tstr, len ); + xmlFree( tstr ); #ifdef HAVE_UTF8 if ( enc == XML_CHAR_ENCODING_UTF8 ) { SvUTF8_on(RETVAL); |