Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can Not XSL-Transform Something so Simple.  RSS feed

 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jose,
The following works for me..
I hope this usage is correct. Hopefully someone can confirm.


 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22203
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!