Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How to convert the output to XHTML?

Help
2006-03-21
2013-04-11
  • Tyron Madlener
    Tyron Madlener
    2006-03-21

    After achieving to install rtf2xml (you could have mentioned that you need python-dev and python-profiler :/) I successfully converted complex_list_bullet.rtf from the test_files.
    Well and then I search for a XSL Translator for PHP and found some extension that uses Sablotron.
    I downloaded your transform package and passed the xml and xsl file to the translator.
    First it complained about '<xsl:document' in header.xsl on line 102 (xsl:document doesn't seem to be a valid instruction in XSLT 1.0...?) so I commented that out.
    Now it works but I just get plain text as output :S

    Could you guys gimme some help about this? That would be terrific.

     
    • Tyron Madlener
      Tyron Madlener
      2006-03-21

      Oh, silly me. Forgot the change a parameter.
      It seems to work but now the CSS and the XHTML is in the same output file :/
      So I really need that <xsl:document href...> instruction. What about it? Why is it not recognized als valid XSL instruction by Sablotron?

       
      • Try changing the version="1.0" at the top to version="1.1"

        My book on XSLT, written by Bob DuCharme, states:

        Warning! Double-check your own processor's syntax for splitting up a result tree into multiple documents. It may be a variation on the syntax shown in this section.

         
        • Tyron Madlener
          Tyron Madlener
          2006-03-22

          Changing the version didn't help.
          What about that statement? I don't quite understand what is meant there.

           
    • Tyron Madlener
      Tyron Madlener
      2006-03-29

      Ok, I saw that libxslt implements xsl:document. I'm gonna try it with that lib.

       
      • Tyron Madlener
        Tyron Madlener
        2006-03-29

        Well, it transforms without any errors now, but the result does not make any sense to me :/

        http://www.tyron.at/test.php

        This definitely does not look like the rtf complex_list_bullet.rtf. Anyone any ideas on this?

         
    • Sorry I didn't get back to you on the sabatron problem. Yes, xsltproc has the xsl:document, as does Saxon. I think Xalan has it too. I had just assumed all processors had it.

      Unfortunately, I don't think I can give you much help on your current problem. You are right; the bullets don't get converted with xsl.

      However, the stylesheets are more examples than anything else. I put most of my effort and time into the rtf2xml script itself, assuming anyone interested in the script would also know how to write an xslt stylesheet.

      I just don't have the time to fix the stylesheet right now. It should be very easy to fix for anyone who knows xslt. Can you maybe ask on a mailing list?

      Again, I am sorry the stylesheet is faulty. I realize I am misleading in describing the project in that I don't emphsize that the main work is in the script itself; the stylesheets are just an afterthought.

       
      • Tyron Madlener
        Tyron Madlener
        2006-03-30

        Indeed yes, but to have the full power of the converter it also needs the right stylesheets ;-)

        And no problem, I appreciate any kind of help and it's not that important for me having an rtf2xhtml converter anyway, it would just a damn cool feature :)

        Do you have me any tips where I could get help or who I could ask?