Solved

xml to xml transformation does not work

Posted on 2009-07-14
5
423 Views
Last Modified: 2013-11-18
hi all,
I'm working on linux version 5 with xampp and trying to transform xml document to another xml document on the fly using xsl
my but it does not work can you please make it work for me the code  is attached when I view source I find the original xml format which means the document not transformed

please help
xml.zip
0
Comment
Question by:hatem_from_mesr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 24848599
Let me start by saying that there is nothing wrong with your XSLT,

I assume that you are looking at the result in a browser.
Well, if you then view source, you will actually see the source, not the transformation result.
The original XML is regarded the "source" in view source, not th etransformation result

If you want to view the result in a browser, you will have to make the result html instead of XML
or rserve the transformation result with a mimetype XML

You are better off using a command line XSLT to get a physical result
and after that, you could view that result XML in a browser, if you want to
0
 

Author Comment

by:hatem_from_mesr
ID: 24848673
>>>>If you want to view the result in a browser, you will have to make the result html instead of XML
>>>>or rserve the transformation result with a mimetype XML
can you guide me how to do that

>>>>You are better off using a command line XSLT to get a physical result
>>>>and after that, you could view that result XML in a browser, if you want to
can you guide me how to do that too

best regards
hatem gamal
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 24848737
serving:
get yourself a webserver,
do the transformation server side
and feed the result XML with the XML mimetype
If you havent't done this before, pick the other way

command line:
get yourself a linux distribution of an XSLT processor
(can't help you too much, since I am not a linux user)
I suggest you download Saxon B (http://saxon.sourceforge.net/)
Make sure you have a java virtual machine
and your command line will likely be something like this
java -jar saxon9.jar xml-file-name xslt-file-name -o result-file-name
please check the docs for that
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 24848805
0
 

Author Comment

by:hatem_from_mesr
ID: 24857943
do you have any idea why that error  appears
[root@lamiayassein saxonsa9-1-0-7j]# java -jar saxon9.jar -t -s:letter-text.xml -xsl:letter2xml.xsl -o:out.xml
Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/ext/DefaultHandler2
        at net.sf.saxon.Configuration.<clinit>(Configuration.java:2047)
        at net.sf.saxon.Transform.setFactoryConfiguration(Transform.java:81)
        at net.sf.saxon.Transform.doTransform(Transform.java:133)
        at net.sf.saxon.Transform.main(Transform.java:66)
[root@lamiayassein saxonsa9-1-0-7j]#

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question