[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Re: Announce: DocBook V5.0b1
Sam Steingold <sds@gnu.org> writes: > thanks. the new (cloaked) file is not acceptable to xsltproc: > impext.cloak-4:1548: parser error : Unescaped '<' not allowed in attributes valu > es > <ulink url="<?ENT_ &clhs;_ENT?>/Body/sec_6-1-3.html"><constant>collect</constan hmm, well that makes sense. I have no idea now why I had it do the <?ENT_ &foo;_ENT?> stuff to begin with. As far as I can see, all that needs to be done is for something to be substituted for all the ampersand characters. Patch pasted in below and change checked in. --Mike Index: cloak =================================================================== RCS file: /cvsroot/docbook/contrib/tools/cloak/cloak,v retrieving revision 1.5 diff -u -r1.5 cloak --- cloak 30 Oct 2005 13:47:19 -0000 1.5 +++ cloak 30 Oct 2005 15:35:57 -0000 @@ -39,7 +39,7 @@ # PI syntax in that SGML PIs don't have the closing question mark $lines =~ s/<\?$comment [\?]+>//; # remove comment added by cloak - $lines =~ s/<\?ENT_ (.*?)_ENT[\?]+>/$1/g; # uncloak all cloaked entities + $lines =~ s/##AMP_ENT##/\&/g; # uncloak all cloaked entities if ($lines =~ /<\?DOCTYPE(.*)_END_SUBSET[\?]+>/s) { $doctype = $1; $doctype =~ s/xxLESS_THANxx/</sg; @@ -56,14 +56,14 @@ $lines = $lines . "\n<?" . $comment . " ?>\n"; # cloak all entities - $lines =~ s/(\w*&[^;]+;\w*)|(&[^;]+;)/<?ENT_ $1_ENT?>/g; + $lines =~ s/&/##AMP_ENT##/g; # uncloak entities in subset - while ($lines =~ /(<!ENTITY[^']*?'[^']*?)<\?ENT_ (.+?)_ENT\?>(.*?'\s*>)/s) { - $lines =~ s/(<!ENTITY[^']*?'[^']*?)<\?ENT_ (.+?)_ENT\?>(.*?'\s*>)/$1$2$3/s + while ($lines =~ /(<!ENTITY[^']*?'[^']*?)##AMP_ENT##(.*?'\s*>)/s) { + $lines =~ s/(<!ENTITY[^']*?'[^']*?)##AMP_ENT##(.*?'\s*>)/$1\&$2/s } - while ($lines =~ /(<!ENTITY[^']*?'[^']*?)<\?ENT_ (.+?)_ENT\?>(.*?'\s*>)/s) { - $lines =~ s/(<!ENTITY[^"]*?'[^"]*?)<\?ENT_ (.+?)_ENT\?>(.*?"\s*>)/$1$2$3/s + while ($lines =~ /(<!ENTITY[^']*?'[^']*?)##AMP_ENT##(.*?'\s*>)/s) { + $lines =~ s/(<!ENTITY[^"]*?'[^"]*?)##AMP_ENT##(.*?"\s*>)/$1\&$2/s } # test to see if there is an internal subset or not, then # cloak DOCTYPE declaration and internal subset (if there is one) -- Michael Smith http://sideshowbarker.net/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]