wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Failing to Add HTML Tags in XSL File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Failing to Add HTML Tags in XSL File" Watch "Failing to Add HTML Tags in XSL File" New topic
Author

Failing to Add HTML Tags in XSL File

Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
I try to add HTML tags to improve the "look" of the output that is translated by XSL (My XSL works well). However, all the HTML tags are ignored. Please help.

My XSL code is shown below:
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

I don't see any "HTML tags" in that XSLT code. Could you explain what you meant by that? Or perhaps you could show us the output that you got and explain why it's different from the output you expected?
Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
I cannot even add <html> <body> </body> </html> anywhre to that XSL file. Once I added <html> </html> there, my IDE shows errors.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

But that is completely different from your original post. "Ignored" and "caused error messages" are not the same thing at all. Please try to post accurate descriptions of your problem.

Anyway I assume you want those HTML tags to surround everything you generate. That's just a guess, but usually that's what those tags are for. I would do that like this:


Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
I did what you suggested and added <h1> Do You See Me!!!</h1>. The <h1> Do You See Me!!!</h1> is displayed as plain text. The "Do You See Me!!!" does not become very big.


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Natalie Kopple wrote:The <h1> Do You See Me!!!</h1> is displayed as plain text. The "Do You See Me!!!" does not become very big.


And where exactly did you try to display that? Also, what exactly did you try to display?

Here's what I expect: You will run the XSLT and it will produce some output. You will take that output, which is some kind of HTML, and display it in a browser. The browser will do its usual processing and display your h1 element as a heading.

Here's what I think: You did something other than that and didn't tell us about it.
Natalie Kopple
Ranch Hand

Joined: May 06, 2003
Posts: 325
In the code that I originally posted, there is a segment of code (please see below). I tried to add HTML tags at different places in that segment of code, all I got are compilation errors. How may I change the code so that I could add HTML tags there? Thank you.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

You don't have to make any changes to be able to add HTML tags to that code. Of course you'd have to add them in such a way that the resulting code was still valid XML; I'm guessing you didn't do that.

However if you want something better than just guesses, you ought to provide better information. Like an example of something which didn't work, along with the actual error messages you got.
 
Consider Paul's rocket mass heater.
 
subject: Failing to Add HTML Tags in XSL File