Bug 55598 - p5-XML-LibXML error messages not showing line numbers
Summary: p5-XML-LibXML error messages not showing line numbers
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: skv
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-15 03:00 UTC by Venkata Pingali
Modified: 2003-11-17 13:42 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.33 KB, patch)
2003-08-15 03:00 UTC, Venkata Pingali
no flags Details | Diff
file.diff (781 bytes, patch)
2003-08-15 03:00 UTC, Venkata Pingali
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Venkata Pingali 2003-08-15 03:00:29 UTC
	p5-XML-LibXML

	I used libxml parser to validate a xml file against a DTD. The
	error message thrown does not have a line number. So I was
	having difficultly figuring out which of the multiple
	instances of an element type was causing the problem.

Fix: libxml2 provides a variable (xmlLineNumbersDefaultValue)  that
	can be set. The p5-XML-LibXML module must allow access to this
	variable.  
	
	The fix is included below
	
-------------------------------------------------------------------
How-To-Repeat: 	use p5-XML-LibXML; 

	my $parser = XML::LibXML->new;
	$parser->validation(1);
	$parser->pedantic_parser(1);
	$parser->load_ext_dtd(1);
	eval { 
	    $parser->parse_string($message);
	};
	if ($@){
	    print "Error: $@ \n";
	    die ("process_xml");
	}
	
	where message contains a XML structure with a reference to a
	DTD. The XML structure is inconsistent with the DTD.
Comment 1 Erwin Lansing freebsd_committer freebsd_triage 2003-08-15 07:44:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skv

Over to maintainer
Comment 2 Tom Hukins freebsd_committer freebsd_triage 2003-11-17 13:39:37 UTC
State Changed
From-To: open->closed

This functionality has been added in version 1.56 of XML::LibXML as the 
line_numbers method. 

Please note:  FreeBSD distributes packages of external code.  If you 
wish to make enhancements to that code (as opposed to fixing problems 
with FreeBSD's distribution) you should contact the author of the 
original software, in this case the author of XML::LibXML.  However, as 
this feature has been added to the module, you no longer need to do 
this.