Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: shtml publisher

by dws (Chancellor)
on Jan 26, 2001 at 01:23 UTC ( [id://54366]=note: print w/replies, xml ) Need Help??


in reply to shtml publisher

To make this correctly handle multiple SSI directives on a line, you're going to have to do a bit of work on one of your regexps.

Try to make it work. The debugging will be insightful.

Additionally, blindly doing s/\.shtml/.html/ may not be what you really want to do. But if it is, don't stop at the first one on the line.

You might want to take a look at my SSI conversion script. It'll give you some ideas on how to handle other directives.

Replies are listed 'Best First'.
Re: Re: shtml publisher
by willdooUK (Beadle) on Jan 30, 2001 at 22:42 UTC

    Yup, this script has its limitations.

    In my case I didn't need it to handle more than one SSI include on one line (but I should have put that in the header)

    Since that shtml regexp is only meant to refer to links, it could maybe be changed to
    s/href=(.+)\.shtml/href=$1.html/gi
    although this would miss links in image maps and it wouldn't work if the href was split over two lines. Opening a can of worms....

    It should definately have had the global modifier :)

    Thanks for the tips.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-28 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found