You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2005/03/02 12:05:00 UTC
Hugo ? - Open Writer Plugin.
Hi,
Did you remarked that there is a lot of "hugo" every where when you
generate with Open Writer Plugin ?
--
Cordialement,
Cyriaque,
Re: Hugo ? - Open Writer Plugin.
Posted by Ferdinand Soethe <sa...@soethe.net>.
Ross Gardler wrote:
RG> You could use the FIXME tag in XDoc.
Good idea. That'll really make it stand out. Will do that.
--
Ferdinand Soethe
Re: Hugo ? - Open Writer Plugin.
Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
>
> Dave Brondsema wrote:
>
> DB> Sounds like a good idea. Unfortunately, I'm not sure if there's any way
> DB> for an XSL template to hook in to an error reporting system. We could
> DB> just change "hugo" to be "Error: Non-Hierarchical OpenOffice.org
> DB> Headings" and the user would have to look at the file itself to notice
> DB> the error.
>
> Yeah, I thought about that as well. Althought it means that you have
> to structure headings properly or your page will look bad.
>
> If we expect people to have good reasons to not structure their pages
> properly, how about writing the warning as an html-comment. That way
> you could still find it but a normal user wouldn't get to see it?
>
> But then again, why not force people to use proper structuring, after
> all we are not doing html here, are we :-)
>
> So if nobody objects, I'll change the hugo code to include a visible
> error message within the heading element and quoting the headings
> text so that it can be found and corrected.
You could use the FIXME tag in XDoc.
Ross
Re: Hugo ? - Open Writer Plugin.
Posted by Ferdinand Soethe <sa...@soethe.net>.
Dave Brondsema wrote:
DB> Sounds like a good idea. Unfortunately, I'm not sure if there's any way
DB> for an XSL template to hook in to an error reporting system. We could
DB> just change "hugo" to be "Error: Non-Hierarchical OpenOffice.org
DB> Headings" and the user would have to look at the file itself to notice
DB> the error.
Yeah, I thought about that as well. Althought it means that you have
to structure headings properly or your page will look bad.
If we expect people to have good reasons to not structure their pages
properly, how about writing the warning as an html-comment. That way
you could still find it but a normal user wouldn't get to see it?
But then again, why not force people to use proper structuring, after
all we are not doing html here, are we :-)
So if nobody objects, I'll change the hugo code to include a visible
error message within the heading element and quoting the headings
text so that it can be found and corrected.
--
Ferdinand Soethe
Re: Hugo ? - Open Writer Plugin.
Posted by Dave Brondsema <da...@brondsema.net>.
Ferdinand Soethe wrote:
>
> Dave Brondsema wrote:
>
> DB> The OO.o plugin does not properly handle headers, so you may encounter
> DB> other weird issues too. I think things work best if you have an ordered
> DB> heirarchy of headings, like this:
>
> DB> heading1
> DB> heading2
> DB> heading2
> DB> heading2
> DB> heading3
> DB> heading2
> DB> heading1
> DB> heading2
>
> DB> and not jump from 1 to 3 for example because the stylesheet doesn't know
> DB> how to create proper <section>s out of that.
>
> I think it is important to know that the OO-Plugin processes documents
> assuming a correct hierarchie of headings. It's technical approach
> enforces this assumption by
>
> - using headlines as a starting point (template match) for the
> processing of all elements.
>
> (This in fact helps translate the flat structure of oo-files (headings
> are not parents of paragraphs) into the hierarchie of forrest
> documents where the section surrounds all the elements within it.)
>
> and
>
> - checking that a headline is never more than one level below the
> previous one (which is, I believe, the recommended use in html as
> well)
>
> The mysterios 'hugo' is actually no more that a strange way to report
> a layering error in common2forrest-stylesheet:
>
>
>> <xsl:template name="createSection">
>> <xsl:param name="currentLevel"/>
>> <xsl:param name="prevLevel"/>
>> <xsl:choose>
>>
>> <xsl:when test="$currentLevel > $prevLevel+1">
>> <section>
>> <title>hugo</title>
>> <xsl:call-template name="createSection">
>> <xsl:with-param name="currentLevel" select="$currentLevel"/>
>> <xsl:with-param name="prevLevel" select="$prevLevel +1"/>
>> </xsl:call-template>
>> </section>
>> </xsl:when>
>> <xsl:otherwise>
>> <section class="{.}">
>> <title>
>> <xsl:apply-templates/>
>> </title>
>> <xsl:apply-templates select="key('rootChildren', generate-id())"/>
>> <xsl:apply-templates select="key('chieldElements', generate-id())"/>
>> </section>
>> </xsl:otherwise>
>> </xsl:choose>
>> </xsl:template>
>
>
> Rather then fixing (that is removing this check), how about replacing
> it with some other way of reporting and rewrite the template like
>
>
>> <xsl:template name="createSection">
>> <xsl:param name="currentLevel"/>
>> <xsl:param name="prevLevel"/>
>> <xsl:choose>
>> <xsl:if test="$currentLevel > $prevLevel+1">
>> new error reporting here
>> </xsl:if>
>> <section class="{.}">
>> <title>
>> <xsl:apply-templates/>
>> </title>
>> <xsl:apply-templates select="key('rootChildren', generate-id())"/>
>> <xsl:apply-templates select="key('chieldElements', generate-id())"/>
>> </section>
>> </xsl:template>
>
>
> If somebody suggests which reporting mechnisms to use here, I'll add
> this to the changes to the ooplugin (support for howtos) I'll be
> posting this week.
>
Sounds like a good idea. Unfortunately, I'm not sure if there's any way
for an XSL template to hook in to an error reporting system. We could
just change "hugo" to be "Error: Non-Hierarchical OpenOffice.org
Headings" and the user would have to look at the file itself to notice
the error.
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal
Re: Hugo ? - Open Writer Plugin.
Posted by Ferdinand Soethe <sa...@soethe.net>.
Dave Brondsema wrote:
DB> The OO.o plugin does not properly handle headers, so you may encounter
DB> other weird issues too. I think things work best if you have an ordered
DB> heirarchy of headings, like this:
DB> heading1
DB> heading2
DB> heading2
DB> heading2
DB> heading3
DB> heading2
DB> heading1
DB> heading2
DB> and not jump from 1 to 3 for example because the stylesheet doesn't know
DB> how to create proper <section>s out of that.
I think it is important to know that the OO-Plugin processes documents
assuming a correct hierarchie of headings. It's technical approach
enforces this assumption by
- using headlines as a starting point (template match) for the
processing of all elements.
(This in fact helps translate the flat structure of oo-files (headings
are not parents of paragraphs) into the hierarchie of forrest
documents where the section surrounds all the elements within it.)
and
- checking that a headline is never more than one level below the
previous one (which is, I believe, the recommended use in html as
well)
The mysterios 'hugo' is actually no more that a strange way to report
a layering error in common2forrest-stylesheet:
> <xsl:template name="createSection">
> <xsl:param name="currentLevel"/>
> <xsl:param name="prevLevel"/>
> <xsl:choose>
>
> <xsl:when test="$currentLevel > $prevLevel+1">
> <section>
> <title>hugo</title>
> <xsl:call-template name="createSection">
> <xsl:with-param name="currentLevel" select="$currentLevel"/>
> <xsl:with-param name="prevLevel" select="$prevLevel +1"/>
> </xsl:call-template>
> </section>
> </xsl:when>
> <xsl:otherwise>
> <section class="{.}">
> <title>
> <xsl:apply-templates/>
> </title>
> <xsl:apply-templates select="key('rootChildren', generate-id())"/>
> <xsl:apply-templates select="key('chieldElements', generate-id())"/>
> </section>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
Rather then fixing (that is removing this check), how about replacing
it with some other way of reporting and rewrite the template like
> <xsl:template name="createSection">
> <xsl:param name="currentLevel"/>
> <xsl:param name="prevLevel"/>
> <xsl:choose>
> <xsl:if test="$currentLevel > $prevLevel+1">
> new error reporting here
> </xsl:if>
> <section class="{.}">
> <title>
> <xsl:apply-templates/>
> </title>
> <xsl:apply-templates select="key('rootChildren', generate-id())"/>
> <xsl:apply-templates select="key('chieldElements', generate-id())"/>
> </section>
> </xsl:template>
If somebody suggests which reporting mechnisms to use here, I'll add
this to the changes to the ooplugin (support for howtos) I'll be
posting this week.
Cheers,
Ferdinand
--
Ferdinand Soethe
Re: Hugo ? - Open Writer Plugin.
Posted by Dave Brondsema <da...@brondsema.net>.
Cyriaque Dupoirieux wrote:
> Hi,
>
> Did you remarked that there is a lot of "hugo" every where when you
> generate with Open Writer Plugin ?
>
Can you provide an example file (ok to send to me personally) so I can
test this?
The OO.o plugin does not properly handle headers, so you may encounter
other weird issues too. I think things work best if you have an ordered
heirarchy of headings, like this:
heading1
heading2
heading2
heading2
heading3
heading2
heading1
heading2
and not jump from 1 to 3 for example because the stylesheet doesn't know
how to create proper <section>s out of that.
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal