Jump to content

xsl pre processor ?


Recommended Posts

I'm working on a xml/xsl/dtd/css site which so far works and renders perfectly with mozilla 1.1+/IE 5.5+

 

what I want is for it to work with opera and other browsers as well.

 

the only way I can think of is to preprocess the resulting code (which seems like a waste .. since xml/xsl is designed to remove the server side pre processing)

 

What I thought is that I could do something like this

<javascript>

if(is_opera())

location.href('preprocess?thispage.xml)

</javascript>

 

I believe this is called an xml transformation engine ??? does that sound right?

 

so has anybody seen anything that does this?

Link to comment
Share on other sites

apropos is your friend ;)

 

~$ apropos xml | egrep "preprocess|parse|html"

libxml               (4)  - library used to parse XML files

xmllint              (1)  - parse XML files and print the result of parsing

~$

 

If you look at the xmllint man page you'll see an option to output the result in html (--htmlout). I'm not sure that that is what you are looking for because I'm not sure if it will work the way you want (I've never played with xmllint)

Link to comment
Share on other sites


8)

got it !!!! ... the problem with Opera .. is it doesn't render xsl at all :screwy:

 

so after 3 days of searching ... it was right infront of me :roll:

[paul@morpheus xml_trial]$ rpm -qa | grep xsl

php-xslt-4.2.3-1mdk

libxslt-proc-1.0.19-4mdk

libxslt1-1.0.19-4mdk

[paul@morpheus xml_trial]$

 

so now I have to do some thing like this

<?php



if(!$_GET

) { $page = "index.xml"; }



if(eregi("opera",$_SERVER['HTTP_USER_AGENT']))

       {

       system("xsltproc xml/layout.xsl ./".$page);

       } else {

       header("Location: ./$page");

       }

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...