Jump to content

[SOLVED] XML - formatted via XSL via WGET


samrtronik

Recommended Posts

This is my first post, though I have been coming here for a while now.... I'm really hoping someone might be able to help out.. I am almost certain this isn't going to be possible, but here is what I am trying to do:

 

I have a php page which creates XML. If a parameter is passed to the php page (csv=1) then the page includes this:

 

    if ($useCSV == 1) {
        $xml .= "<?xml-stylesheet type=\"text/xsl\" href=\"makecsv.xsl\"?>\n";
    }

 

This formats the page as though the data were a CSV file, and they want to create a cron script which gets the data, parses it using simple tools like GREP and automatically updates a page on their Wiki.

 

We are trying to use WGET to pick up the CSV but as XSL is browser based WGET just returns the XML. In a browser of course, the page looks like a nicely formatted CSV.

 

My next stop is just to create another page which just returns CSV data, but it would be nice to use something like this if possible. Is there such a thing as server side CSS?!

 

Any ideas?

Link to comment
Share on other sites

Thanks for the speedy reply.

 

I think they have already started to edit their scripts so this is now hopefully not an issue. I would be surprised if this hasn't come up for someone before.

 

It would make scripting easier, although I presume most systems now expect XML. Maybe if there was a parameter to wget (a bit like the -f) to allow csv parsing....

 

 

Link to comment
Share on other sites

I just found this on the wget forums:

 

5.2. Can Wget download links found in CSS?

 

Thanks to code supplied by Ted Mielczarek, Wget can now parse embedded CSS stylesheet data and text/css files to find additional links for recursion. This feature is not yet in any official release, it's in the development sources only. The support for this feature will be available in Wget release version 1.12.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.