Update p5-XML-Twig to 3.26.
Based on patch provided by Martin Wilke via PR 34412.
And modify dependency.
- Remove p5-WeakRef>=0.01: this is optional and Scalar::Util or WeakRef,
and Scalar::Util alredy exists in perl base package.
- Remove p5-File-Temp>=0.12: newer version exsits in perl base package.
Changes:
Changes in 3.26
added argument to -i in the Makefile to prevent
problem in win32
added XML::Twig::Elt former_next_sibling,
former_prev_sibling and former_parent methods
squashed a memory leak when parsing html
(forgot to call delete on the HTML::Tree object)
fixed bug that caused XML::Twig to hang if
there was a syntax error in a predicate
(RT#19499, reported by Dan Dascalescu)
made start_tag and end_tag more consistent: they
now both return the empty string for comments,
PIs... (reported by Dan Dascalescu)
added parsefile_inplace and parsefile_html_inplace
methods (thanks to GrandFather on perlmonks)
added support to add css stylesheet in the
add_stylesheet method (thanks to Georgi Sotirov)
patched tests to work on Win32
added set_inner_xml inner_xml and set_inner_html
methods
Changes in 3.25
patched to work with perl 5.005!
fixed a bug in xml_pp when pretty printing a
file in place in a different file system
Changes in 3.24
added loading the text of entities stored in
separate files (using SYSTEM) when the (awfully
named!) expand_external_ents option is used.
Thanks to jhx for spotting this.
changed set_cdata, set_pi and set_comment so that
if you call them on an element of the wrong kind,
everything works as expected, instead of swallowing
silently the data. Bug spotted by cmccutcheon
fixed a whole bunch of things to make the module
run and the tests pass on VMS, thanks to Peter
(Stig) Edwards who reported bug RT #18655 and
provided a patch.
fixed bug on get_xpath( '/root[1]') expressions,
RT #18789 spotted by memfrob.
added the add_stylesheet method, that... adds a
stylesheet (xsl type is supported, let me know if
other types are needed) to a document.
allowed pasting PI/Comment elements before or after
the root of a document (see discussion at
http://perlmonks.org/index.pl?node_id=538550).
Thanks to rogue90 for noticing the problem, and to
Tanktalus for finding the best way to solve it.
aliased unwrap to erase (eg added the unwrap method
to XML::Twig::Elt, identical to the existing erase)
suggested by Chris Burbridge.
fixed bug RT #17522: flushing twice at the end of
the the parse would output the last fragment twice.
Spotted by Harco de Hilster.
dealt with bug RT #17500: parsing a pipe when using
the UTF8 perlIO layer (through PERL_UNICODE or -C)
now raises an error, found by Nikolaus Rath.
made the tests pass when the UTF8 perlIO layer is
used. At this point potential problems when parsing
non-UTF8 XML in this configuration are not trapped.
Changes in 3.23
added autoflush: there is no more need for the
last $twig->flush after the parsing, it is done
automatically at the end of the parsing, with the
same arguments as the first flush on the twig.
This can be turned of by setting $twig->{twig_autoflush}
to 0.
WARNING: if you finished the output with a direct
print instead of a flush, then this change will
cause a bug. Hopefully this should not be the case
and is easily fixable.
fixed bug RT #17145 where get_xpath('//root/elt[1]/child')
would produce a fatal error if there were no elt
element under root. Spotted by Dan Dascalescu.
fixed bug RT #17064 (comments and PIs after the
root element were not properly processed), spotted
by Dan Dascalescu.
fixed bug RT #17044: the SYSTEM value was not
output in UpdateDTD mode, thanks to Michal
Lewandowski for pointing this out.
changed the way empty tags are expanded with the
'html' style: only tags that are allowed to be
empty in XHTML are output as '<tag />', thanks
to Tom Rathborne for proding me to look into this.
added a 'wrapped' pretty_print option, that is
a bit dodgy I think but that might please some.
fixed bug RT #16540 (tags with specific names
(like 'level'), tripped XML::Twig, spotted by
Graham
added comparison with XML::LibXML in the SEE ALSO
section (and in the FAQ), following a question
from surf on c.l.p.m
XML::Twig now rejects string/regexp condition
in twig_roots
added better error checking in xml_grep
fix for string/regexp condition in xml_grep
added support for ! @att (or not @att) in get_xpath
added support for several predicates in get_xpath
(not nested predicates though).
fixed bug RT #15671 (wrong condition interpretation
for attribute value 0)
added XML::Twig print_to_file method
added XML::Twig::Elt methods: following_elt,
following_elts, preceding_elt, preceding_elts
(needed to support the corresponding axis in
get_xpath)
Changes in 3.22
added the XML::Twig xparse method, which parses
whatever is thrown at it (filehandle, string,
HTML file, HTML URL, URL or file).
added the XML::Twig nparse method, which creates
a twig and then calls xparse on the last parameter.
added the parse_html and parsefile_html methods,
which parse HTML strings (or fh) and files
respectively, whith the help of HTML::TreeBuilder.
the implementation may still change. Note that
at the moment there seems to be encoding problems
with it (if the input is not UTF8).
added info to t/zz_dump_config.t
fixed a bug that caused subs_text to leave empty
#PCDATA elements if the regexp matched at the begining
or at the end of the text of an element.
fixed RT #15014: in a few methods objects were
created as XML::Twig::Elt, instead of in the classu^!F
of the calling object.
fixed RT #14959: problem with wrap_children when
an attribute of one of the child element includes
a '>'
improved the docs for wrap_children
added a better error message when re-using an
existing twig during the parse
partially fixed a bug with windows line-endings in
CDATA sections with keep_encoding set (RT #14815)
added Test::Pod::Coverage test to please the kwalitee
police ;--)
Changes in 3.21
fixed a test that failed if Tie::IxHash was not
available
added link to Atom feed for the CPAN testers
results at http://xmltwig.com/rss/twig_testers.rss
Changes in 3.20
fixed the pod (which caused the tests to fail)
Changes in 3.19
redid the fix to RT # 14008, this one should be ok
u^!F
restructured tests
added the _dump method (probably not finished)
Changes in 3.18
added a fix to deal with a bug in XML::Parser in the
original_string method when used in CDATA sections
longer than 1024 chars (RT # 14008) thanks to Dan
Dascalescu for spotting the bug and providing a test
case.
added better error diagnostics when the wrong arguments
are used in paste
fixed a bug in subs_text when the text of an element
included \n (RT #13665) spotted by Dan Dascalescu
cleaned up the behaviour of erase when the element
being erased has extra_data (comments or pis) attached
fixed a bug in subs_text that sometimes messed up text
after the matching text
fixed the erase/group_tags option of simplify to make
it exactly similar to XML::Simple's
fixed a bug that caused XML::Twig to crash when ignore
was used with twig_roots (RT #13382) spotted by Larry
Siden
fixed bug in xml_split with default entities (they
ended up being doubly escaped)
fixed various bugs when dealing with ids (changing
existing ids, setting the attribute directly...)
mark and split now accepts several tags/ as arguments,
so you can write for example:
$elt->mark( qr/^(\w+): (.*)$/, 'dt', 'dd');
added XML::Twig::Elt children_trimmed_text method,
patch sent by ambrus (RT #12510)
changed children_text and children_trimmed_text to
have them return the entire text in scalar context
fixed bug that caused XML::Twig not to play nice with
XML::Xerces (due to improper import of UNIVERSAL::isa)
spotted and patched by Colin Robertson.
removed most references to 'gi' in the docs, replaced
them by tag. I guess Robin Berjon's relentless teasing
is to be credited with this one.
added tag_regexp condition on handlers (a regexp instead
of a regular condition will trigger the handler if the
tag matches), suggested by Franck Porcher, implementation
helped by a few Perl Monks
(http://perlmonks.org/index.pl?node_id=445677).
fixed typos in xml_split (RT #11911 and #11911),
reported by Alexey Tourbin
added tests for xml_split and xml_merge and fixed
a few bugs in the process
added the -i option to xml_split and xml_merge,
that use XInclude instead of PIs (preliminary
support, the XInclude namespace is not declared
for example).
Added the XML::Twig and XML::Twig::Elt trim method
that trims an element in-place
Added the XML::Twig last_elt method and the XML::Twig::Elt
last_descendant method
Added more tests
2006-11-06 14:40:41 +01:00
|
|
|
# $NetBSD: Makefile,v 1.13 2006/11/06 13:40:41 obache Exp $
|
2003-08-07 06:10:03 +02:00
|
|
|
#
|
|
|
|
|
Update p5-XML-Twig to 3.26.
Based on patch provided by Martin Wilke via PR 34412.
And modify dependency.
- Remove p5-WeakRef>=0.01: this is optional and Scalar::Util or WeakRef,
and Scalar::Util alredy exists in perl base package.
- Remove p5-File-Temp>=0.12: newer version exsits in perl base package.
Changes:
Changes in 3.26
added argument to -i in the Makefile to prevent
problem in win32
added XML::Twig::Elt former_next_sibling,
former_prev_sibling and former_parent methods
squashed a memory leak when parsing html
(forgot to call delete on the HTML::Tree object)
fixed bug that caused XML::Twig to hang if
there was a syntax error in a predicate
(RT#19499, reported by Dan Dascalescu)
made start_tag and end_tag more consistent: they
now both return the empty string for comments,
PIs... (reported by Dan Dascalescu)
added parsefile_inplace and parsefile_html_inplace
methods (thanks to GrandFather on perlmonks)
added support to add css stylesheet in the
add_stylesheet method (thanks to Georgi Sotirov)
patched tests to work on Win32
added set_inner_xml inner_xml and set_inner_html
methods
Changes in 3.25
patched to work with perl 5.005!
fixed a bug in xml_pp when pretty printing a
file in place in a different file system
Changes in 3.24
added loading the text of entities stored in
separate files (using SYSTEM) when the (awfully
named!) expand_external_ents option is used.
Thanks to jhx for spotting this.
changed set_cdata, set_pi and set_comment so that
if you call them on an element of the wrong kind,
everything works as expected, instead of swallowing
silently the data. Bug spotted by cmccutcheon
fixed a whole bunch of things to make the module
run and the tests pass on VMS, thanks to Peter
(Stig) Edwards who reported bug RT #18655 and
provided a patch.
fixed bug on get_xpath( '/root[1]') expressions,
RT #18789 spotted by memfrob.
added the add_stylesheet method, that... adds a
stylesheet (xsl type is supported, let me know if
other types are needed) to a document.
allowed pasting PI/Comment elements before or after
the root of a document (see discussion at
http://perlmonks.org/index.pl?node_id=538550).
Thanks to rogue90 for noticing the problem, and to
Tanktalus for finding the best way to solve it.
aliased unwrap to erase (eg added the unwrap method
to XML::Twig::Elt, identical to the existing erase)
suggested by Chris Burbridge.
fixed bug RT #17522: flushing twice at the end of
the the parse would output the last fragment twice.
Spotted by Harco de Hilster.
dealt with bug RT #17500: parsing a pipe when using
the UTF8 perlIO layer (through PERL_UNICODE or -C)
now raises an error, found by Nikolaus Rath.
made the tests pass when the UTF8 perlIO layer is
used. At this point potential problems when parsing
non-UTF8 XML in this configuration are not trapped.
Changes in 3.23
added autoflush: there is no more need for the
last $twig->flush after the parsing, it is done
automatically at the end of the parsing, with the
same arguments as the first flush on the twig.
This can be turned of by setting $twig->{twig_autoflush}
to 0.
WARNING: if you finished the output with a direct
print instead of a flush, then this change will
cause a bug. Hopefully this should not be the case
and is easily fixable.
fixed bug RT #17145 where get_xpath('//root/elt[1]/child')
would produce a fatal error if there were no elt
element under root. Spotted by Dan Dascalescu.
fixed bug RT #17064 (comments and PIs after the
root element were not properly processed), spotted
by Dan Dascalescu.
fixed bug RT #17044: the SYSTEM value was not
output in UpdateDTD mode, thanks to Michal
Lewandowski for pointing this out.
changed the way empty tags are expanded with the
'html' style: only tags that are allowed to be
empty in XHTML are output as '<tag />', thanks
to Tom Rathborne for proding me to look into this.
added a 'wrapped' pretty_print option, that is
a bit dodgy I think but that might please some.
fixed bug RT #16540 (tags with specific names
(like 'level'), tripped XML::Twig, spotted by
Graham
added comparison with XML::LibXML in the SEE ALSO
section (and in the FAQ), following a question
from surf on c.l.p.m
XML::Twig now rejects string/regexp condition
in twig_roots
added better error checking in xml_grep
fix for string/regexp condition in xml_grep
added support for ! @att (or not @att) in get_xpath
added support for several predicates in get_xpath
(not nested predicates though).
fixed bug RT #15671 (wrong condition interpretation
for attribute value 0)
added XML::Twig print_to_file method
added XML::Twig::Elt methods: following_elt,
following_elts, preceding_elt, preceding_elts
(needed to support the corresponding axis in
get_xpath)
Changes in 3.22
added the XML::Twig xparse method, which parses
whatever is thrown at it (filehandle, string,
HTML file, HTML URL, URL or file).
added the XML::Twig nparse method, which creates
a twig and then calls xparse on the last parameter.
added the parse_html and parsefile_html methods,
which parse HTML strings (or fh) and files
respectively, whith the help of HTML::TreeBuilder.
the implementation may still change. Note that
at the moment there seems to be encoding problems
with it (if the input is not UTF8).
added info to t/zz_dump_config.t
fixed a bug that caused subs_text to leave empty
#PCDATA elements if the regexp matched at the begining
or at the end of the text of an element.
fixed RT #15014: in a few methods objects were
created as XML::Twig::Elt, instead of in the classu^!F
of the calling object.
fixed RT #14959: problem with wrap_children when
an attribute of one of the child element includes
a '>'
improved the docs for wrap_children
added a better error message when re-using an
existing twig during the parse
partially fixed a bug with windows line-endings in
CDATA sections with keep_encoding set (RT #14815)
added Test::Pod::Coverage test to please the kwalitee
police ;--)
Changes in 3.21
fixed a test that failed if Tie::IxHash was not
available
added link to Atom feed for the CPAN testers
results at http://xmltwig.com/rss/twig_testers.rss
Changes in 3.20
fixed the pod (which caused the tests to fail)
Changes in 3.19
redid the fix to RT # 14008, this one should be ok
u^!F
restructured tests
added the _dump method (probably not finished)
Changes in 3.18
added a fix to deal with a bug in XML::Parser in the
original_string method when used in CDATA sections
longer than 1024 chars (RT # 14008) thanks to Dan
Dascalescu for spotting the bug and providing a test
case.
added better error diagnostics when the wrong arguments
are used in paste
fixed a bug in subs_text when the text of an element
included \n (RT #13665) spotted by Dan Dascalescu
cleaned up the behaviour of erase when the element
being erased has extra_data (comments or pis) attached
fixed a bug in subs_text that sometimes messed up text
after the matching text
fixed the erase/group_tags option of simplify to make
it exactly similar to XML::Simple's
fixed a bug that caused XML::Twig to crash when ignore
was used with twig_roots (RT #13382) spotted by Larry
Siden
fixed bug in xml_split with default entities (they
ended up being doubly escaped)
fixed various bugs when dealing with ids (changing
existing ids, setting the attribute directly...)
mark and split now accepts several tags/ as arguments,
so you can write for example:
$elt->mark( qr/^(\w+): (.*)$/, 'dt', 'dd');
added XML::Twig::Elt children_trimmed_text method,
patch sent by ambrus (RT #12510)
changed children_text and children_trimmed_text to
have them return the entire text in scalar context
fixed bug that caused XML::Twig not to play nice with
XML::Xerces (due to improper import of UNIVERSAL::isa)
spotted and patched by Colin Robertson.
removed most references to 'gi' in the docs, replaced
them by tag. I guess Robin Berjon's relentless teasing
is to be credited with this one.
added tag_regexp condition on handlers (a regexp instead
of a regular condition will trigger the handler if the
tag matches), suggested by Franck Porcher, implementation
helped by a few Perl Monks
(http://perlmonks.org/index.pl?node_id=445677).
fixed typos in xml_split (RT #11911 and #11911),
reported by Alexey Tourbin
added tests for xml_split and xml_merge and fixed
a few bugs in the process
added the -i option to xml_split and xml_merge,
that use XInclude instead of PIs (preliminary
support, the XInclude namespace is not declared
for example).
Added the XML::Twig and XML::Twig::Elt trim method
that trims an element in-place
Added the XML::Twig last_elt method and the XML::Twig::Elt
last_descendant method
Added more tests
2006-11-06 14:40:41 +01:00
|
|
|
DISTNAME= XML-Twig-3.26
|
2003-08-07 06:10:03 +02:00
|
|
|
PKGNAME= p5-${DISTNAME}
|
|
|
|
SVR4_PKGNAME= p5xtw
|
|
|
|
CATEGORIES= textproc perl5
|
Update to 3.16:
Changes in 3.16
added the xml_split/xml_merge tools
fixed PI handler behaviour when used in twig_roots
mode
fix a bug that prevented the DTD to be output
when update_DTD mode is on, no DTD is present but
entities have been created
added level(<n>) trigger for handlers
fixed bug that prevented the output_filter to be
called when printing an element. Spotted thanks to
Louis Strous.
fixed bug in the nsgmls pretty printer that output
invalid XML (an extra \n was added in the end tag)
found by Lee Goddard
fixed test 284 in test_additional to make it pass
in RedHat's version of perl 5.8.0, thanks to
rdhayes for debugging and fixing that test.
first shot at getting Pis and comments back in the
proper place, even in 'keep' mode. At the moment
using set_pcdata (or set_cdata) removes all
embedded comments/pis
fixed a bug with pi's in keep mode (pi's would not
be copied if they were within an element) found by
Pascal Sternis
added a fix to get rid of spurious warnings, sent
by Anthony Persaud
added the remove_cdata option to the XML::Twig new
method, that will output CDATA sections as regular
(escaped) PCDATA
added the index option to the XML::Twig new method,
and the associated XML::Twig index method, which
generates a list of element matching a condition
during parsing
added the XML::Twig::Elt first_descendant method
fixed a bug with the keep_encoding option where
attributes were not parsed when the element name was
followed by more than one space (spotted by Gerald
Sedrati-Dinet),
see https://rt.cpan.org/Ticket/Display.html?id=8137
fixed a bug where whitespace at the begining of an
element could be dropped (if followed by an element
before any other character). Now whitespace is
dropped only if it includes a \n
added feature: when load_DTD is used, default
attributes are now filled
fixed bug on xmlns in path expression trigger
(would not replace prefixes in path expressions),
spotted by amonroy on perlmonks, see
http://perlmonks.org/index.pl?node_id=386764
optimized XML::Twig text, thanks to Nick Lassonde
for the patch
fixed bug that generated an empty line before some
comments (pointed out by Tanya Huang)
fixed tests to check XML::Filter::BufferText version
(1.00 has a bug in the CDATA handling that makes XML::Twig
tests fail).
Added new options --nowrap and --exclude (-v) to xml_grep
fixed warning in tests under 5.8.0 (spotted by Ed Avis)
skipped HTML::Entities tests in 5.8.0 (make test for this
module seem to fail on my system, it might be the same
elsewhere)
Fixed bug RT #6067 (problems with non-standard versions of
Scalar::Utils which do not include weaken)
Fixed bug RT #6092 (error when using safe output filter)
Fixed bug when using map_xmlns, tags in default namespace
were not output
Changes in 3.15
Fixes that allow the tests to pass on more systems (thanks to Ed
Avis for his testing)
Added normalize_space option for simplify (suggestion of Lambert Lum)
Removed usage of $&
Expanded the doc for paste, as it was a bit short (suggestion of
Richard Jolly)
Changes in 3.14
Namespace processing has been enhanced and should work fine now,
as long as twig_roots is not used.
Potentially uncompatible change: the behaviour of simplify has
been changed to mimic as exactly as possible XML::Simple's XMLin
Completed the pod to cover the entire API
Tests now pass with perl 5.005_04-RC1 (fail with 5.005 reported
by David Claughton), added more tests and a config summary at the
end of the tests
Added methods on the class attribute, convenient for dealing with
XHTML or preparing display with CSS:
class set_class add_to_class att_to_class add_att_to_class
move_att_to_class tag_to_class add_tag_to_class set_tag_class in_class
navigation functions can use '.<class>' expressions
fixed (yet another!) bug in the way DTDs were output
fixed bug for pi => 'drop' option
changed the names of lots on internal (undocumented) methods, prefixed
them with _
2005-02-19 20:32:21 +01:00
|
|
|
MASTER_SITES= http://www.xmltwig.com/xmltwig/ \
|
|
|
|
${MASTER_SITE_PERL_CPAN:=XML/}
|
2003-08-07 06:10:03 +02:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2003-08-07 06:10:03 +02:00
|
|
|
HOMEPAGE= http://www.xmltwig.com/
|
|
|
|
COMMENT= Efficient XML document interface
|
|
|
|
|
|
|
|
DEPENDS+= p5-XML-Parser>=2.23:../../textproc/p5-XML-Parser
|
|
|
|
|
2005-05-24 00:21:46 +02:00
|
|
|
# These are only needed for the test target
|
|
|
|
#DEPENDS+= p5-IO-stringy-[0-9]*:../../devel/p5-IO-stringy
|
|
|
|
#DEPENDS+= p5-Test-Pod-[0-9]*:../../devel/p5-Test-Pod
|
|
|
|
#DEPENDS+= p5-Text-Iconv-[0-9]*:../../converters/p5-Text-Iconv
|
|
|
|
#DEPENDS+= p5-Tie-IxHash-[0-9]*:../../devel/p5-Tie-IxHash
|
|
|
|
#DEPENDS+= p5-Unicode-Map8-[0-9]*:../../converters/p5-Unicode-Map8
|
|
|
|
#DEPENDS+= p5-Unicode-String-[0-9]*:../../converters/p5-Unicode-String
|
|
|
|
#DEPENDS+= p5-XML-Filter-BufferText-[0-9]*:../../textproc/p5-XML-Filter-BufferText
|
|
|
|
#DEPENDS+= p5-XML-Handler-YAWriter-[0-9]*:../../textproc/p5-XML-Handler-YAWriter
|
|
|
|
#DEPENDS+= p5-XML-SAX-Writer-[0-9]*:../../textproc/p5-XML-SAX-Writer
|
|
|
|
#DEPENDS+= p5-XML-Simple-[0-9]*:../../textproc/p5-XML-Simple
|
|
|
|
#DEPENDS+= p5-XML-XPath-[0-9]*:../../textproc/p5-XML-XPath
|
|
|
|
#DEPENDS+= p5-YAML-[0-9]*:../../textproc/p5-YAML
|
|
|
|
#DEPENDS+= p5-libwww-[0-9]*:../../www/p5-libwww
|
|
|
|
|
2004-04-23 22:39:54 +02:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
|
2005-07-13 20:01:18 +02:00
|
|
|
PERL5_PACKLIST= auto/XML/Twig/.packlist
|
2003-08-07 06:10:03 +02:00
|
|
|
|
|
|
|
.include "../../lang/perl5/module.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|