5E Character Create Playlist
  1. #1

    Join Date
    Jul 2006
    Location
    Taichung, TAIWAN
    Posts
    50

    XML linefeed (text formatting)

    I'm new to XML but a veteran to HTML. I can't seem to find a way to duplicate the linefeed <br> from HTML...

    Code:
    <p><b><i>small armor:</i></b><br>
    <li><i>cost -- 75% normal price</i></li>
    <li><i>weight -- 50% of the listed amount</i></li></p>
    The above code gives FG a fatal error. Changing the linefeed tag to <br /> won't kill the application but it acts as if it isn't there. Without the <br>, the 'cost' line actually overlaps the 'small armor:' line. Moving the </p> tag to the end of the first line DOES separate these lines, but adds a full line of white space. <h> tags don't do the trick, either.

    So is there any way in XML to have a single line followed by a list without a full blank line?

  2. #2

    Join Date
    Jun 2006
    Location
    San Diego, CA
    Posts
    45
    Not sure if this helps, but:

    HTML code is, AFAIK, only allowed in FormattedText nodes. If you use the HTML code script in any other node type the XML Dom parser will assume you are working on an XML node (hence many forums using closed brackets vs. open brackets to indicate text modes - i.e. italic, bold and underlined - for example).

    I haven't come across any line break in any of the xml files I have access to, however you could implement the code using tables instead (which seems to be the SOP for FG HTML text)...

  3. #3

    Join Date
    Jul 2006
    Location
    Taichung, TAIWAN
    Posts
    50

    Tables, indeed!

    I just decided to throw it into a table which has the desired effect. Heh, thanks for the reply

  4. #4

    Join Date
    Jul 2006
    Location
    Taichung, TAIWAN
    Posts
    50

    Still not quite perfect...

    Using a table in the code below, there's no blank line for the <tr><td>&nbsp;</td></tr>. I tried using <p> tags, separating the info into two tables and both of these methods together -- none of them worked. Using <p> tags seems to had huge amounts of space (one at the beginning of the tag and one at the end -- or perhaps the <table> tag is also adding one at the beginning).

    Code:
    <table><tr><td><b><i>small armor:</i></b></td></tr>
    <tr><td><li><i>cost -- 75% normal price</i></li><li><i>weight -- 50% of the listed amount</i></li></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td><b><i>tiny armor:</i></b></td></tr>
    <tr><td><li><i>cost -- 50% normal price</i></li>
    <li><i>weight -- 10% of the listed amount</i></li>
    <li><i>defensive value is halved (rounded down)</i></li></td></tr></table>
    Any idea how to get that single line of space to show?

    nevermind -- fixed it

    Apparently, the <li> tags mess up FG's ability to calculate # of lines... do each <li> has to be put inside its own <tr><td>***</td></tr> tags otherwise later text with overlap... strange!
    Last edited by Zakarius; October 14th, 2006 at 07:50.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in