Robohelp import - double spaces - <pre> Style

This forum is for all Flare issues related to importing files or projects.
Post Reply
Wayne Newberry
Propeller Head
Posts: 18
Joined: Mon Nov 03, 2008 9:25 am

Robohelp import - double spaces - <pre> Style

Post by Wayne Newberry »

I have imported a Robohelp project that contains a lot of code samples to which I want to apply the pre style.
When I apply the style, I notice that the lines break in several places.
After investigation, it appears that the breaks occur wherever there are two spaces with an intervening newline.
In other words, in the imported HTML files a line of code may appear on more than one line and, if there are two lines, there will be a space at the end of one line and another space at the beginning of the second line.
Flare appears to be treating the space-newline-space as a reason for breaking the line when I apply the pre style.
This leads to the need for a lot of manual editing -- something that I'm trying to avoid.
I have read these forums and found the option in the search window to edit the source text, but I can't get it to search for the space-newline-space combination. Lots of editors have this limitation.
I have access to external (to Flare) editors in which I could do this kind of search and replace, but when I edit a file in this way, Flare then has a problem with the file, complaining about a parsing error and not finding an expected colon at some position of line 1. From this, I draw the conclusion that editing an HTML file outside of Flare is not a good idea.
I'm hoping that there is a trick to getting rid of these double spaces with intervening newlines.
In the meantime, back to manually removing them.
Wayne
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Robohelp import - double spaces - <pre> Style

Post by KevinDAmery »

Wayne Newberry wrote:I have access to external (to Flare) editors in which I could do this kind of search and replace, but when I edit a file in this way, Flare then has a problem with the file, complaining about a parsing error and not finding an expected colon at some position of line 1. From this, I draw the conclusion that editing an HTML file outside of Flare is not a good idea.
Not really true: it all depends on whether those external editors maintain the XHTML structure of the file. Line one would be something in the
XML or HTML declarations area. Make sure the external editor isn't changing that part of the file.

Many users here use external text editors without incident, so it isn't inherently a problem.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Wayne Newberry
Propeller Head
Posts: 18
Joined: Mon Nov 03, 2008 9:25 am

Re: Robohelp import - double spaces - <pre> Style

Post by Wayne Newberry »

Thanks for the idea that using an appropriate external editor would avoid the problem of messing up the file structure.
I went looking for an XHTML-capable editor and found Notpad++. I edited a few files and all went well.
Then today, the problem was back. I made a few simple changes within a file and after that, Flare started to complain about missing colons in line one. One of the error messages pointed to a character position that fell beyond the apparent length of the line.
Do you have any recommendations for an editor, hopefully free, that won't make Flare upset?
Thanks,
Wayne
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Robohelp import - double spaces - <pre> Style

Post by KevinDAmery »

Hmmm... NotePad++ is one of the ones that people have had success with.

Could you paste the section of code we're talking about into the forum so we could take a look? Use the Code button above so that the forum doesn't try to turn it into something purty.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Wayne Newberry
Propeller Head
Posts: 18
Joined: Mon Nov 03, 2008 9:25 am

Re: Robohelp import - double spaces - <pre> Style

Post by Wayne Newberry »

Here is the entire contents of one of the files that causes Flare to complain. The specific complaint is that the first line of the file is missing two colons, one at position 22 and one at position 40. By my eye, that is the space before the word "endcoding and the final ">" but I suspect that the error message is misleading.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:id="Fields_in_EK_TCPIPCFG_Structure.htm" MadCap:timeEstimate="0" MadCap:priority="0" MadCap:status="In Progress" MadCap:lastBlockDepth="3" MadCap:lastHeight="449" MadCap:lastWidth="624">
    <head><title>Fields in EK_TCPIPCFG Structure</title>
        <link rel="StyleSheet" href="VCI3.css" />
        <link href="Resources/TableStyles/Basic.css" rel="stylesheet" MadCap:stylesheetType="table" />
    </head>
    <body>
        <h1>
            <MadCap:keyword term="Fields in EK_TCPIPCFG Structure;Baud Rate:CSLIP connection:fields in EK_TCPIPCFG;EK_TCPIPCFG Structure:fields in;IRQ Number:fields in EK_TCPIPCFG;Memory:fields in EK_TCPIPCFG" />Fields in EK_TCPIPCFG Structure</h1>
        <table style="width: 84.765%; mc-table-style: url('Resources/TableStyles/Basic.css'); margin-left: 0; margin-right: auto;" class="TableStyle_Basic" cellspacing="0">
            <tbody>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep"> </td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">Field 1</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">Field 2</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">Field 3</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">Field 4</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd" style="font-weight: bold;">Field 5</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">NE2000</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">I/O addresses</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">IRQ number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">unused</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">unused</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd">unused</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">SMC 91C9x</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">I/O addresses</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">IRQ number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">connection typeq</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">unused</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd">unused</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">SMC 8xxx</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">I/O addresses</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">IRQ number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">unused</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">shared memory address</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd">shared memory address</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">3Com 3C509</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">I/O addresses</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">IRQ number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">ID port</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">connection type</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd">unused</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep" style="font-weight: bold;">PPP</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">COM port number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">IRQ number baudrate</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">baud rate</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">hardware handshaking</td>
                    <td class="TableStyle_Basic_Body_0_0_RowSep_ColEnd">16550 configuraiton</td>
                </tr>
                <tr>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColSep" style="font-weight: bold;">SLIP</td>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColSep">COM port number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColSep">IRQ number</td>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColSep">baud rate</td>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColSep">hardware handshaking</td>
                    <td class="TableStyle_Basic_Body_0_0_RowEnd_ColEnd">16550 configuration</td>
                </tr>
            </tbody>
        </table>
    </body>
</html>
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Robohelp import - double spaces - <pre> Style

Post by KevinDAmery »

Hm, not sure what to tell you. I copied your text into a blank topic in my project and opened it in Flare. Flare wanted to convert it to XML (which seems odd, considering it has an XML declaration in the first line - it might be related to the extra spaces at the beginning of that line though). After converting, it opened without any complaints.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Wayne Newberry
Propeller Head
Posts: 18
Joined: Mon Nov 03, 2008 9:25 am

Re: Robohelp import - double spaces - <pre> Style

Post by Wayne Newberry »

You might try building a project using that file. That is one of the two times that I see the error message (on the error tab).
The other is when I try certain things while editing a file. For example, if I insert a table, the error window pops up at the bottom of the XML Editor window and displays the "missing colon" messages.
By the way, the project builds OK, even though the error messages appear, so it isn't a show stopper. It makes me nervous though.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Robohelp import - double spaces - <pre> Style

Post by KevinDAmery »

Builds ok and I can insert a table as well.

I believe you when you're saying you're having a problem, I just can't duplicate it. Sorry I can't make any more concrete suggestions. You might want to open a support ticket with Madcap if you have a maintenance contract.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Wayne Newberry
Propeller Head
Posts: 18
Joined: Mon Nov 03, 2008 9:25 am

Re: Robohelp import - double spaces - <pre> Style

Post by Wayne Newberry »

Just to continue the conversation a bit, it appears that the content ofthe file is not the cause of the problem.
This leads me to think that the metadata associated with the file may be the root cause.
Two variations occur to me:
a) The external editors that I've used are not truly XHTML compliant. I took Notepad++ descriptions at face value but perhaps I shouldn't have.
b) Flare is doing something in the metadata (file header?) that is not XHTML compliant, and the external editors do not preserve this when saving a file.
Do you or one of the software engineers have any comments on these ideas?
Thanks,
Wayne
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Robohelp import - double spaces - <pre> Style

Post by KevinDAmery »

I don't work for Madcap, so I really couldn't say. I'd open a support ticket and maybe send a topic or two to Madcap and let them see if they can find anything odd.

http://www.madcapsoftware.com/support/flarecontact.aspx
Until next time....
Image
Kevin Amery
Certified MAD for Flare
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Robohelp import - double spaces - <pre> Style

Post by navoff »

Wayne Newberry wrote:Just to continue the conversation a bit, it appears that the content ofthe file is not the cause of the problem.
This leads me to think that the metadata associated with the file may be the root cause.
Two variations occur to me:
a) The external editors that I've used are not truly XHTML compliant. I took Notepad++ descriptions at face value but perhaps I shouldn't have.
b) Flare is doing something in the metadata (file header?) that is not XHTML compliant, and the external editors do not preserve this when saving a file.
The header lines are fine as well. The first line is identical to the ones that show in mine. The second line has some additional fields than mine but their construct looks fine and they appear to be "info only" kinds of things. For example:

Code: Select all

<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:id="Fields_in_EK_TCPIPCFG_Structure.htm" MadCap:timeEstimate="0" MadCap:priority="0" MadCap:status="In Progress" MadCap:lastBlockDepth="3" MadCap:lastHeight="449" MadCap:lastWidth="624">
In that line the <html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" is identical to the one in all of my files and is standard XML coding. The last part of the line: MadCap:lastBlockDepth="3" MadCap:lastHeight="449" MadCap:lastWidth="624"> Is also standard. and is providing information about how it displayed in Flare the last time it was opened.

There are a couple of optional fields that are listed in yours that I don't see mine but their construct is fine: MadCap:id="Fields_in_EK_TCPIPCFG_Structure.htm" MadCap:timeEstimate="0" MadCap:priority="0" MadCap:status="In Progress". The id field is typically used in html/xml for identifying files for cross referencing. The last three fields MadCap:timeEstimate="0" MadCap:priority="0" MadCap:status="In Progress" appear to be harmless information used by Flare.

I used Vim and set the display to show any hidden characters (i.e. tabs or control charactes). There were none. I also copied and pasted your code into a file in a test project I have and it didn't complain once, not even during the build. My guess is that it's in something else, like the toc file or perhaps it's something in the file that is listed in the toc just before the one getting the error, particularly if you're seeing the problem during a build. Barring that, my next guess would be that the Flare application itself has something corrupted in it causing it to misread the files or that there's something in a cache or running in the background that is causing Flare to not play nice.

Some of the obvious "solutions" would be the standard reboot of the PC. This would clear any cache or anything running in the background. If all else fails you could also try to do a re-install of Flare. I'd contact Flare support before I went that route. They would probably have you package up your project in a zip file so they could take a closer look at it and see if there's something in those files causing the problem.
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
Post Reply