DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 10 of 10

Thread: Transform xml document to another xml document

  1. #1
    keren Guest

    Transform xml document to another xml document


    Hi,

    I need a processor to transform xml document to another xml document, I'm
    using the xalan product from IBM, but as I understood it supports only transformation
    to HTML files.
    I thought of defining XSL stylesheet to do the transformation.
    Is it possible? Is there a better way to do it?


  2. #2
    John Guest

    Re: Transform xml document to another xml document


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >

    Solo from Xoology can transform XML documents. Their Web site has a Tutorial
    at http://www.xoology.com/solox/ksTutor...x.html?page=15

    Regards

  3. #3
    Gerard Schuckman Guest

    Re: Transform xml document to another xml document


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >



  4. #4
    Gerard Schuckman Guest

    Re: Transform xml document to another xml document


    Keren,

    What you might do is use a tool that transforms any ytd known xml dialect
    into the required xml. I would recommend you to visit the www.optio.com site.



    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >



  5. #5
    Patrick Guest

    Re: Transform xml document to another xml document


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >


    Keren,

    I have noticed that you have received a lot of responses indicating you should
    use one product or another. Although the may be good products there are
    not required to do your transformation. XSL is a good appraoch to your problem
    and does what you are trying to accomplish. XSL supports transformation
    to both HTML and XML. There were some samples of this exact problem in MSDN
    from microsoft. Hope this helps.


  6. #6
    dave Guest

    Re: Transform xml document to another xml document


    Hi keren,
    Yes there are a number of tools that can do this. You can use applications
    or write your own script to apply XSL to the document.

    <shameless_plug>
    Rather than recommend an application, I have a listing of different vendors
    at:
    http://www.xmldir.com/directory.asp?dir=472

    If you want to see numerious tutorials, using Microsoft, IBM or other technology,
    I have them listed at:
    http://www.xmldir.com/directory.asp?dir=8
    </shameless_plug>

    dave





    "Patrick" <plynch@hsanet.net> wrote:
    >
    >"keren" <kzohar@spark5.com> wrote:
    >>
    >>Hi,
    >>
    >>I need a processor to transform xml document to another xml document, I'm
    >>using the xalan product from IBM, but as I understood it supports only

    transformation
    >>to HTML files.
    >>I thought of defining XSL stylesheet to do the transformation.
    >>Is it possible? Is there a better way to do it?
    >>

    >
    >Keren,
    >
    >I have noticed that you have received a lot of responses indicating you

    should
    >use one product or another. Although the may be good products there are
    >not required to do your transformation. XSL is a good appraoch to your problem
    >and does what you are trying to accomplish. XSL supports transformation
    >to both HTML and XML. There were some samples of this exact problem in

    MSDN
    >from microsoft. Hope this helps.
    >



  7. #7
    Guy Guest

    Re: Transform xml document to another xml document


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >


    No purchase necessary...

    Here's some VB code:
    Set oDOMDoc = New DOMDocument
    oDOMDoc.Load ("old.xml")
    Set oXSLDoc = New DOMDocument
    oXSLDoc.Load ("d:\development\xmltest\test.xsl")
    sNewXML = oDOMDoc.transformNode(oXSLDoc)
    oDOMDoc.loadXML sNewXML
    oDOMDoc.Save ("new.xml")

    Here's the XSL:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <NEW_SCHEMA>
    <PERCENTAGE><xsl:value-of select="OLDSCHEMA/PERCENTAGE"/></PERCENTAGE>
    <HISTORY>
    <xsl:for-each select="OLDSCHEMA/PLACES">
    <ITEM>
    <WHO><xsl:value-of select="house_number"/></WHO>
    <WHEN><xsl:value-of select="street_name"/></WHEN>
    <WHAT><xsl:value-of select="city"/></WHAT>
    <WHERE><xsl:value-of select="state"/></WHERE>
    </ITEM>
    </xsl:for-each>
    </HISTORY>
    </NEW_SCHEMA>
    </xsl:template>
    </xsl:stylesheet>

    XSL lets you use XML tags - you do not necessarily have to use HTML tags.

    :Guy deWardener

  8. #8
    Jeff Guest

    Re: Transform xml document to another xml document


    Hi,

    Infoteria has an XSLT processor that will convert to XML, HTML, or text.
    www.infoteria.com


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >



  9. #9
    Jenish Guest

    Re: Transform xml document to another xml document



    It would be better if you implement this using XSL.
    XSL Processer transform XML documents form one format to another.
    and even in HTML and PDF Formats.

    This can be achieve with following steps :


    1. Author the content as an XML document.

    2. Write an XSL style sheet to define how a Web browser displays the XML
    document's elements and attributes. In a nutshell, the XSL style sheet is
    your XML document's presentation template.

    3. Write an ASP script to perform the XML to HTML transformation on the server.
    This way, you get all of the benefits of using XML to simplify Web site maintenance,
    while maintaining backward compatibility with older browsers. This ASP script
    uses IE 5's XML DOM implementation to parse both documents, perform the transformation,
    and stream the output to the browser as raw HTML.


    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >



  10. #10
    Osama Guest

    Re: Transform xml document to another xml document


    Who says you cant use Xalan to perform XML-XML transformations using an XSLT
    document? Xalan does the job. XSLT does not care what the output is HTML
    or XML it is all based on pattern matching and templates.

    "keren" <kzohar@spark5.com> wrote:
    >
    >Hi,
    >
    >I need a processor to transform xml document to another xml document, I'm
    >using the xalan product from IBM, but as I understood it supports only transformation
    >to HTML files.
    >I thought of defining XSL stylesheet to do the transformation.
    >Is it possible? Is there a better way to do it?
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center