Solved

xml to xml transformation does not work

Posted on 2009-07-14
5
421 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect file exist or not 3 158
Grunt No Clean Targets 6 157
XML XSL Message 3 22
configure dependency in POM for new database 3 26
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

803 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