Thanks a lot!
-- Dave
On Aug 4, 2004, at 6:56 AM, BABA Yoshihiko wrote:
The simplest (yet ugly) solution is probably like this:
#for docs and faq
$text =~ s|</head>.*<body>(¥n)*(<!--¥?)|¥';¥n¥n|s;
$text =~ s|</body>.*</html>(¥n)*(<!--¥?)|¥';¥n¥n|s;
$text =~ s|<!--¥?|<?|g;
$text =~ s|¥?-->|?>|g;
$text =~ s|{FINK_([^}]*)}|<? echo FINK_$1 ; ?>|g;
# for news
$text =~ s|</head><body>|';¥n¥ninclude_once "header.inc";¥n?>¥n¥n|s;
$text =~ s|</body></html>|¥n¥n<?¥ include_once "footer.inc"; ?>|s;
See also the attached file. This worked with news, docs and faq on my
system.
Below is an explanation of what I did to postprocess.pl
Index: postprocess.pl
===================================================================
RCS file: /cvsroot/fink/web/xml/postprocess.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- postprocess.pl 7 Mar 2004 20:57:54 -0000 1.8
+++ postprocess.pl 10 Jul 2004 12:34:29 -0000 1.9
@@ -20,8 +20,16 @@
while ($text =~ s|(</title>.*[^\\])'(.*</head>)|$1\\'$2|s) {
}
$text =~ s|</title>|";\n\$cvs_author = '$tag_author';\n\$cvs_date =
'$tag_date';\n\$metatags = '|s;
-$text =~ s|</head>.*<body>|';\n\ninclude_once
"header.inc";\n?>\n\n|s;
-$text =~ s|</body>.*</html>|\n\n<?\ include_once "footer.inc"; ?>|s;
+#$text =~ s|</head>.*<body>|';\n\ninclude_once
"header.inc";\n?>\n\n|s;
+#$text =~ s|</body>.*</html>|\n\n<?\ include_once "footer.inc"; ?>|s;
Commented out.
+$text =~ s|</head>.*<body>(\n)*(<!--\?)?|\';\n\n|s;
+$text =~ s|</body>.*</html>|\n\n|s;
Instead, I modified XSLT file to output something like "<!--? include
foo; ?-->".
+$text =~ s|<!--\?|<?|g;
+$text =~ s|\?-->|?>|g;
This will modify
<!--? include "footer.inc"; ?-->
to
<? include "footer.inc"; ?>
+$text =~ s|{FINK_([^}]*)}|<? echo FINK_$1 ; ?>|g;
This line is for something else.
<postprocess.pl>
--
BABA Yoshihiko
"You can take my freedom but you can't take my beer!!" by aarkzoo
Town Planner (Kyoto Center for Community Collaboration)
Support, Translation and Documentation Team, Fink Project
(http://fink.sourceforge.net)
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel