From f893973de8caab189863f5a8e151a050eb18be4b Mon Sep 17 00:00:00 2001 From: Peter von Kaehne Date: Wed, 30 May 2018 12:38:35 +0000 Subject: remove header of document prior to seeking certain tags git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@525 07627401-56e2-0310-80f4-f8cd0041bdcd --- modules/conf/confmaker.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/conf/confmaker.pl b/modules/conf/confmaker.pl index e2c411d..66be5b8 100755 --- a/modules/conf/confmaker.pl +++ b/modules/conf/confmaker.pl @@ -136,6 +136,9 @@ my $hs = HTML::Strip->new(); my $doc_text = new Sword::SWBuf($hs->parse($doc->toString())); ## obtain name, type and language +for my $root ($doc->findnodes(q{/header/})) { + $root->unbindNode; +} my @elements = $doc->getElementsByTagName('osisText'); @@ -180,6 +183,12 @@ if (!(exists $version{$v11n})) { print STDERR "\n"; exit(-1); } +#remove
tag and child nodes as its presence can cause confusion +for my $header ($doc->getElementsByTagName('header')) { + $header->unbindNode; +} + + ##GlobalOptionsFilter - prepare @@ -280,6 +289,8 @@ print "SwordVersionDate=".`date +"%F"`; print "Lang=".$doc_lang."\n"; + + foreach (@doc_features) { if ($doc_has_feature{$_}) { print "GlobalOptionFilter=".$doc_filters{$_}."\n" -- cgit