Can we convert xml format to other xml format like (OEBPS)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachinshastri
    New Member
    • Nov 2009
    • 10

    Can we convert xml format to other xml format like (OEBPS)

    hi
    i have xml file , i want to transform its format to OEBPS format by PHP, is it possible to transform xml conversion to other xml format ?

    Kindly reply me as soon as possible

    Thanks
    Sachin Sharma
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    if you have an appropriate XSL file, PHP can do the conversion for you.

    Comment

    • sachinshastri
      New Member
      • Nov 2009
      • 10

      #3
      thanks for ur reply
      can your help me with code how php will do this conversion ?

      Thanks
      Sachin Shastri

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        PHP 5 has its own XSL processing class, see its documentation.

        Comment

        • sachinshastri
          New Member
          • Nov 2009
          • 10

          #5
          thanks
          But i am not geting with OEBPS format
          Can u help me in that , how we transform in this format

          Thanks
          Shastri

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            as I mentioned, you have to write an XSL file for that.

            Comment

            • sachinshastri
              New Member
              • Nov 2009
              • 10

              #7
              ok but how xsl convert it into OEBPS format

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                that depends on what you have, see also this tutorial

                Comment

                • sachinshastri
                  New Member
                  • Nov 2009
                  • 10

                  #9
                  see this link

                  i want to convert my xml into Open eBook Publication Structure Specification Version 1.2 it also a xml type coding

                  see i want to convert my xml into this format through php

                  The OEBPS/As You Like It.opf file:
                  Code:
                  <?xml version="1.0"?> <!DOCTYPE package PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.2 Package//EN" "http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd"> <package unique-identifier="Package-ID"> <metadata> <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0"> <dc:Identifier id="Package-ID">ebook:guid-6B2DF0030656ED9D8</dc:Identifier> <dc:Title>As You Like It</dc:Title> <dc:Creator role="aut">William Shakespeare</dc:Creator> <dc:Identifier>0-7410-1455-6</dc:Identifier> <dc:Subject></dc:Subject> <dc:Type></dc:Type> <dc:Date event="publication">3/24/2000</dc:Date> <dc:Date event="copyright">1/1/9999</dc:Date> <dc:Identifier scheme="ISBN">0-7410-1455-6</dc:Identifier> <dc:Publisher>Project Gutenberg</dc:Publisher> <dc:Language></dc:Language> </dc-metadata> </metadata> <manifest> <item id="4915" href="book.html" media-type="text/x-oeb1-document"/> <item id="7184" href="images/cover.png" media-type="image/png" /> </manifest> <spine> <itemref idref="4915"/> </spine> </package>
                  Last edited by Dormilich; Nov 6 '09, 09:26 AM. Reason: Please use [code] tags when posting code

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #10
                    and what is your XML? usually, you have to write xsl files yourself (some IDE’s may provide conversion of one known xml format into another known one)

                    Comment

                    • sachinshastri
                      New Member
                      • Nov 2009
                      • 10

                      #11
                      1) can we do conversion of xml to xsl by pragmatically in php ?

                      2) can we do conversion of XSL format to OEBPS format by pragmatically in php ?

                      Is these are possible or not ?

                      Comment

                      • Dormilich
                        Recognized Expert Expert
                        • Aug 2008
                        • 8694

                        #12
                        1) I think you misunderstand here. you do xml-to-xml conversion using xsl and php
                        2) Yes, if you feed PHP with an input xml and an input xsl

                        Comment

                        • sachinshastri
                          New Member
                          • Nov 2009
                          • 10

                          #13
                          thanks i got ur point
                          but can we do conversion of XSL format to OEBPS format by pragmatically in php ?

                          Comment

                          • Dormilich
                            Recognized Expert Expert
                            • Aug 2008
                            • 8694

                            #14
                            why do you want to convert xsl? didn’t you want to convert your xml file?

                            Comment

                            • sachinshastri
                              New Member
                              • Nov 2009
                              • 10

                              #15
                              yeah i want to convert my xml but how i can get OEBPS format.

                              according to u first i will convert my xml into xsl

                              Comment

                              Working...