Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to make the HTML output from XSL process readable in text form?

Reply
Thread Tools

how to make the HTML output from XSL process readable in text form?

 
 
jaydog
Guest
Posts: n/a
 
      11-08-2004
Hello...

I'm new to XSL, and I've written a XSLT file that converts a XML file
to HTML format. When viewed in a browser, it appears exactly as I
would like. However, if I want to look at the HTML as text, which I
do, then I have trouble because the XSLT processor (SAXON) outputs
everything as one continuous line.

How can I make the HTML output from SAXON readable? Is there a
command in the XSLT language that forces line breaks? (not <br> but
actual breaks in the text file)

Below is a sample of the HTML code that SAXON is churning out.

As an aside, I'm looking ultimately to generate SVG output instead of
HTML. Can anyone recommend a good online tutorial?

Thank you for any help!
jason

<?xml version="1.0" encoding="utf-8"?><tr><th colspan="2"><h2
style="color:blue"><p>Blackboard
Levels</p></h2></th></tr><table><br/><br/><tr><td valign="top"
cellpadding="4"><h3 style="color:grey">Level = planes</h3><font
color="green" size="-1">planeID</font><br/><font color="green"
size="-1">planeType</font><br/><font color="green"
size="-1">maxNumberOfPassengers</font><br/><font color="orange"
size="-1">flight/flights</font><br/><td
valign="top"><table><br/><br/><tr><td valign="top" cellpadding="4"><h3
style="color:grey">Level = plane_sub_one</h3><font color="green"
size="-1">more stuff</font><br/><font color="green" size="-1">even
more stuff</font><br/><td valign="top"><table><br/><br/><tr><td
valign="top" cellpadding="4"><h3 style="color:grey">Level =
plane_sub_two</h3><font color="green" size="-1">twooooo</font><br/><td
valign="top"/></td></tr></table></td></td></tr></table></td></td></tr></table><table><br/><br/><tr><td
valign="top" cellpadding="4"><h3 style="color:grey">Level =
flights</h3><font color="green"
size="-1">numberOfPassengers</font><br/><font color="green"
size="-1">flightName</font><br/><font color="green"
size="-1">flightOrigin</font><br/><font color="green"
size="-1">flightDestination</font><br/><font color="orange"
size="-1">plane/planes</font><br/><td
valign="top"/></td></tr></table><table><br/><br/><tr><td valign="top"
cellpadding="4"><h3 style="color:grey">Level = Meta_Cognitive</h3><td
valign="top"><table><br/><br/><tr><td valign="top" cellpadding="4"><h3
style="color:grey">Level = Instance</h3><font color="green"
size="-1">id</font><br/><font color="green"
size="-1">start_time</font><br/><font color="green"
size="-1">context</font><br/><font color="green"
size="-1">interruption_count</font><br/><font color="green"
size="-1">suspension_count</font><br/><font color="green"
size="-1">time_spent</font><br/><font color="green"
size="-1">remaining_time_to_spend</font><br/><font color="green"
size="-1">priority</font><br/><font color="green"
size="-1">status</font><br/><font color="orange"
size="-1">task/Meta_Cognitive.Task</font><br/><td
valign="top"/></td></tr></table><table><br/><br/><tr><td valign="top"
cellpadding="4"><h3 style="color:grey">Level = Task</h3><font
color="green" size="-1">name</font><br/><font color="green"
size="-1">started_instances_count</font><br/><font color="green"
size="-1">total_interruption_count</font><br/><font color="green"
size="-1">total_suspension_count</font><br/><font color="green"
size="-1">total_time_spent</font><br/><font color="green"
size="-1">average_interruption_count</font><br/><font color="green"
size="-1">average_suspension_count</font><br/><font color="green"
size="-1">average_time_spent</font><br/><font color="green"
size="-1">goal_executions_counter</font><br/><font color="green"
size="-1">determine_calls_counter</font><br/><font color="green"
size="-1">micro_model_calls_counter</font><br/><font color="green"
size="-1">method_calls_counter</font><br/><font color="green"
size="-1">calculate_calls_counter</font><br/><font color="green"
size="-1">cpp_actions_calls_counter</font><br/><font color="green"
size="-1">cel_actions_calls_counter</font><br/><font color="green"
size="-1">balistic_actions_calls_counter</font><br/><font
color="orange" size="-1">instances/Meta_Cognitive.Instance</font><br/><font
color="orange" size="-1">model/Meta_Cognitive.Model</font><br/><td
valign="top"/></td></tr></table><table><br/><br/><tr><td valign="top"
cellpadding="4"><h3 style="color:grey">Level = Model</h3><font
color="green" size="-1">name</font><br/><font color="green"
size="-1">time_spent</font><br/><font color="orange"
size="-1">tasks/Meta_Cognitive.Task</font><br/><td
valign="top"/></td></tr></table></td></td></tr></table>
 
Reply With Quote
 
 
 
 
Joris Gillis
Guest
Posts: n/a
 
      11-08-2004

> I'm new to XSL, and I've written a XSLT file that converts a XML file
> to HTML format. When viewed in a browser, it appears exactly as I
> would like. However, if I want to look at the HTML as text, which I
> do, then I have trouble because the XSLT processor (SAXON) outputs
> everything as one continuous line.
>
> How can I make the HTML output readable?


Hi,

put this in your stylesheet:
<xslutput indent="yes" />

regards,

--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
 
Reply With Quote
 
 
 
 
jason schlachter
Guest
Posts: n/a
 
      11-09-2004
brilliant. Thank you Joris. It worked great...even put the proper
indentations in place.

-jason

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use output of XSL transformation as new XSL stylesheet barney.b@iname.com XML 0 01-16-2006 02:29 PM
xsl - ignore XSL:FO tags, just output them paul.rusu@gmail.com XML 0 12-21-2005 03:49 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
How to make email readable from two addresses? Potato chip Computer Support 5 10-27-2004 02:36 AM
use xsl:element to output an "<xsl:template match=...> ? Ray Tayek XML 3 11-30-2003 10:14 AM



Advertisments