Solved

xml to xml transformation does not work

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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

691 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