Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

xml to xml transformation does not work

Posted on 2009-07-14
5
Medium Priority
?
426 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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…
Suggested Courses

618 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