Subject: Re: xmlcatalog and bad xml/catalog
To: Jeremy C. Reed <reed@reedmedia.net>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 10/09/2003 22:43:40
On Thu, 9 Oct 2003 12:58:17 -0700 (PDT)
"Jeremy C. Reed" <reed@reedmedia.net> wrote:

> I will look a little more. Anyways, I installed gawk. I built your package
> with "bmake AWK=gawk" and the build said:
> 
>   gawk: -:2: warning: escape sequence `\/' treated as plain `/'
> 
> Then after installing it, I cleaned out the related line from the
> share/xml/catalog, I reran:
> $ /var/db/pkg/libglade2-2.0.1nb10/+INSTALL libglade2 POST-INSTALL
> here -c /usr/share/xml/catalog add system http://glade.gnome.org/glade-2.0.dtd /usr/X11R6/share/xml/libglade/glade-2.0.dtd
> gawk: -:2: warning: escape sequence `\/' treated as plain `/'
> gawk: -:2: warning: escape sequence `\.' treated as plain `.'
> 
> (The "here" part was just me outputting the arguments to your command
> first.)
> 
> These gawk warnings make me think that the escape sequence  (at least for
> that part) is not really needed.
> 
> Do you get those warnings?

No I don't.  If I saw them, they could be fixed ;)  This is gawk 3.0.3 (while you
have 3.1.3, right?).  BTW, just installed mawk to test and found the problems you
reported... (I mean, this is not some of those non-reproducible problems hehe).

[...]
> I don't think the $entry needs everything to be escaped. (I got rid of
> your metaquote entry and my share/xml/catalog became 0 bytes because og
> gawk syntax errors.)
> 
> My awk pocket refernce tells me that \/ for literal slash is for regular
> expressions -- so not needed for printing strings.
> 
> \\ literal backslash and \" literal doublequote (for strings) should be
> enough.

Sounds good.  Thanks much for the analysis and the patch.  I'll work on it tomorrow,
after I get some sleep.

Cheers

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/