wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Can Not XSL-Transform Something so Simple. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Can Not XSL-Transform Something so Simple." Watch "Can Not XSL-Transform Something so Simple." New topic
Author

Can Not XSL-Transform Something so Simple.

Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Good Night Ranchers !

You know the cool thing about my job is... That I get to learn so Many Incredible Things! It's awesome, The Bad thing is, the deadlines are usually ridiculous. And I've been asked to do something I haven't done before, and it's supposed to be simple, yet I'm still in trouble.

I want to Transform this:



Into This:



By using This:



But Somehow All I get out of the transformation is this:

DefaultString1JoseDefaultString2Campana

What Am I doing wrong?

I feel I just need a little push here to get me going. I don't know where my biggest mis-conception here lies.

Hope you guys can Help me out.

Best Regards,

Jose
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Jose,
The following works for me..
I hope this usage is correct. Hopefully someone can confirm.


Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Hi There Gamini !

I tried your solution, and I'm not sure what to comment about it. It actually outputs:

JoseCampana (In FireFox)

Am I understanding XSL Functionality correctly?

Is it possible to get an XSL Transformation to Print an XML?, not just tag values.

I mean, I'm totally lost But, when I open my xml with XSL applied to it... it should show exactly this XML in the Browser:




If it's not much of a trouble, Could you please teach me how to do it?

Have a nice day,

Jose
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, first of all don't use a browser to examine your output. Use a plain ordinary text editor. Gamini's code should do what you want (except I would simplify it a little bit, like this:)
Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Hey There Paul !

You Guys were Right. That XSL Does Work correctly ! I decided to test it using WebSphere Message Broker Toolkit's XSL Debugger, and there it does output the desired XML.
However I'm perplexed at knowing that I can't use a Browser to see How an XSL affects an XML. I would like to know which text Editor do you use to work in these cases.

Thank you very much. You guys saved my life once again.

Good Luck!

Jose
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can Not XSL-Transform Something so Simple.
 
Similar Threads
Can I do this with XSLT?
How to count ?
is it possible?
xslt node recursion
Using XSL to display XML