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

Discussion in 'XML' started by jaydog, Nov 8, 2004.

  1. jaydog

    jaydog Guest

    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>
     
    jaydog, Nov 8, 2004
    #1
    1. Advertising

  2. jaydog

    Joris Gillis Guest


    > 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:
    <xsl:eek:utput indent="yes" />

    regards,

    --
    Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
    Ceterum censeo XML omnibus esse utendum
     
    Joris Gillis, Nov 8, 2004
    #2
    1. Advertising

  3. 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!
     
    jason schlachter, Nov 9, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,612
    A. Bolmarcich
    May 27, 2005
  2. pac
    Replies:
    12
    Views:
    743
    Larry Bates
    May 19, 2006
  3. aspineux
    Replies:
    8
    Views:
    339
    Bruno Desthuilliers
    Jan 9, 2008
  4. Replies:
    1
    Views:
    545
  5. Danny
    Replies:
    3
    Views:
    144
    Steven Burn
    Aug 24, 2004
Loading...

Share This Page