OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[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:

> > * Norman Walsh <aqj@ajnyfu.pbz> [2005-10-29 08:58:45 -0400]:
> >
> > [3] http://docbook.org/docs/howto/
> 
> cloak script does not cloak some entities.
> e.g., in
> ----------
> <foo>&bar;
> ----------
> &bar; is not cloaked (try cloaking clisp/doc/impext.xml).

That is because the regex pattern I had in there was only matching
entities that have zero or more "word" characters around them. And
">" is not a word character, so it didn't match.

For some reason, what I had it doing was cloaking any word
characters directly adjacent to the entity along with the entity.
I'm not sure now why I had it that way. But I suspect there was
some reason, so I have preserved that match and added a second on
that matches entities regardless of what characters are adjacent
to them. I have checked in the change (patch below). Please test
it and let me know if it works.

  --Mike

Index: cloak
===================================================================
RCS file: /cvsroot/docbook/contrib/tools/cloak/cloak,v
retrieving revision 1.3
diff -u -r1.3 cloak
--- cloak	15 Jun 2005 10:56:18 -0000	1.3
+++ cloak	30 Oct 2005 08:31:36 -0000
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: cloak,v 1.3 2005/06/15 10:56:18 xmldoc Exp $
+# $Id: cloak,v 1.4 2005/10/30 08:27:04 xmldoc Exp $
 
 =head1 NAME
 
@@ -55,7 +55,9 @@
 
     $lines = $lines . "\n<?" . $comment . " ?>\n";
 
-    $lines =~ s/(\w*&\w+;\w*)/<?ENT_ $1_ENT?>/g;      # cloak all entities
+    # cloak all entities
+    $lines =~ s/(\w*&\w+;\w*)/<?ENT_ $1_ENT?>/g;
+    $lines =~ s/(&\w+;)/<?ENT_ $1_ENT?>/g;
 
     # uncloak entities in subset
     while ($lines =~ /(<!ENTITY[^']*?'[^']*?)<\?ENT_ (.+?)_ENT\?>(.*?'\s*>)/s) {

-- 
Michael Smith
http://sideshowbarker.net/

smime.p7s



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]