From: Bob Stayton Date: Wed, 29 Jan 2014 03:09:45 +0000 (+0000) Subject: Improve handling of namespace conversion in preparation for X-Git-Tag: release/1.79.1~6^2~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e639969ee1e36d8339b56ff3eccf157dc8d2428f;p=docbook-dsssl Improve handling of namespace conversion in preparation for shifting source base to the namespaced version. --- diff --git a/releasetools/xslns-build b/releasetools/xslns-build index 4a7def7f0..3d371b515 100755 --- a/releasetools/xslns-build +++ b/releasetools/xslns-build @@ -55,10 +55,10 @@ my @PassthruDirs = ( 'extensions', 'profiling', 'images', -'template', 'tools', 'build', 'slides', +'template', 'website', 'wordml', ); @@ -69,6 +69,9 @@ my @PassthruFiles = ( 'html2xhtml.xsl', 'xsl2profile.xsl', 'olink.xsl', +'addns.xsl', +'stripns.xsl', +'tbl.xsl', ); umask 002; @@ -204,9 +207,6 @@ sub copyXsl { if ( grep /^$basename$/,@PassthruFiles ) { copy($f, $dest); } - elsif ( $f =~ /stripns\.xsl/ ) { - # skip it - } elsif ( grep /^$dir$/, @PassthruDirs ) { copy($f, $dest); } @@ -253,17 +253,6 @@ sub nsfilter { s|(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform"(?!>))(\s*\n?)(\s*)|$1$2$3xmlns:d="http://docbook.org/ns/docbook"\n$3|s; - # Convert stripNS to addNS - s|href="../common/stripns.xsl"|href="../common/addns.xsl"|sg; - - # Convert stripNS to addNS for profiling stylesheets - s|(]*name="profiled-content").*?mode="profile".*?()| Adding DocBook namespace to version 4 DocBook document |sg; - - s|(\s*\n*)(\s*)(.*?()|$1$2$3 test="namespace-uri\(\*\[1\]\) != 'http://docbook.org/ns/docbook'">\n$2 \n$2 Note\n$2 \n$2 \n$2 namesp. add\n$2 \n$2 \n$2 added namespace before processing\n$2 \n$2 \n$2 \n$2 \n$2 \n$2 \n$2$4|sg; - - # Remove the "Hack!" message --> - s|||sg; - # Add namespace d to exclude-result-prefixes if ( $_ =~ /exclude-result-prefixes\s*=/ ) { @@ -273,6 +262,18 @@ sub nsfilter { s|(