You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by David Wimsey <dw...@rtsz.com> on 2010/05/06 23:57:47 UTC

flowRoot doesn't seem to handle flowPara children properly

It would appear that if I create a flowRoot with the required flowRegion and a flowPara (which seems to be allowed by my interpretation of the spec, Am I reading it wrong?) no text is rendered.

If I nest the flowPara inside a flowDiv first, it works fine, which also is fine according to the spec.

The real problem for me comes down to the fact that Inkscape doesn't seem to output the flowDiv, where as the other editors we've been using in the past do.  I was tracking down the various bits of info to submit it as a bug to Inkscape but the spec seems to indicate the bug is in Batik.

Anyone have any thoughts as to fixing this?  Doesn't seem like it should be too much of a fix for someone with knowledge of the internals, or is there a reason that it works like it does?

Note: The spec I'm refering to is: http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html  Again, feel free to correct me if I'm wrong.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Re: flowRoot doesn't seem to handle flowPara children properly

Posted by David Wimsey <dw...@rtsz.com>.
Sorry to self reply, forgot to attach the examples.

So here they are, test_good.svg works fine but isn't what Inkscape spits out, though it seems every other editor does output this way.  test_bad.svg isn't directly from Inkscape but the elements are the same and it seems to be valid, just doesn't render the text, nor does Squiggle let you select the text or anything like that.  Its not just invisible its not there at all.

On May 6, 2010, at 5:57 PM, David Wimsey wrote:

> It would appear that if I create a flowRoot with the required flowRegion and a flowPara (which seems to be allowed by my interpretation of the spec, Am I reading it wrong?) no text is rendered.
> 
> If I nest the flowPara inside a flowDiv first, it works fine, which also is fine according to the spec.
> 
> The real problem for me comes down to the fact that Inkscape doesn't seem to output the flowDiv, where as the other editors we've been using in the past do.  I was tracking down the various bits of info to submit it as a bug to Inkscape but the spec seems to indicate the bug is in Batik.
> 
> Anyone have any thoughts as to fixing this?  Doesn't seem like it should be too much of a fix for someone with knowledge of the internals, or is there a reason that it works like it does?
> 
> Note: The spec I'm refering to is: http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html  Again, feel free to correct me if I'm wrong.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Re: flowRoot doesn't seem to handle flowPara children properly

Posted by jonathan wood <jo...@gmail.com>.
disregard my comment...removal of he additional attribute shows the same
problem.

On Thu, May 6, 2010 at 6:11 PM, jonathan wood <jo...@gmail.com>wrote:

>
> I think maybe test_good.svg is a bad reference...the (second) style
> attribute of the rect tag is dangling?
>
>     <flowRegion>
>     <rect y="0" x="0" width="128" height="128"
> style="stroke:none;fill:none"/>
>          style="fill:none;stroke:none" />
>     </flowRegion>
>
>
>
> On Thu, May 6, 2010 at 6:01 PM, David Wimsey <dw...@rtsz.com> wrote:
>
>> Again, attachment ... I should quit now.
>>
>>
>>
>>
>> On May 6, 2010, at 5:57 PM, David Wimsey wrote:
>>
>> > It would appear that if I create a flowRoot with the required flowRegion
>> and a flowPara (which seems to be allowed by my interpretation of the spec,
>> Am I reading it wrong?) no text is rendered.
>> >
>> > If I nest the flowPara inside a flowDiv first, it works fine, which also
>> is fine according to the spec.
>> >
>> > The real problem for me comes down to the fact that Inkscape doesn't
>> seem to output the flowDiv, where as the other editors we've been using in
>> the past do.  I was tracking down the various bits of info to submit it as a
>> bug to Inkscape but the spec seems to indicate the bug is in Batik.
>> >
>> > Anyone have any thoughts as to fixing this?  Doesn't seem like it should
>> be too much of a fix for someone with knowledge of the internals, or is
>> there a reason that it works like it does?
>> >
>> > Note: The spec I'm refering to is:
>> http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html  Again, feel free
>> to correct me if I'm wrong.
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
>> > For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
>> >
>> >
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
>>
>
>

Re: flowRoot doesn't seem to handle flowPara children properly

Posted by jonathan wood <jo...@gmail.com>.
I think maybe test_good.svg is a bad reference...the (second) style
attribute of the rect tag is dangling?

    <flowRegion>
    <rect y="0" x="0" width="128" height="128"
style="stroke:none;fill:none"/>
         style="fill:none;stroke:none" />
    </flowRegion>



On Thu, May 6, 2010 at 6:01 PM, David Wimsey <dw...@rtsz.com> wrote:

> Again, attachment ... I should quit now.
>
>
>
>
> On May 6, 2010, at 5:57 PM, David Wimsey wrote:
>
> > It would appear that if I create a flowRoot with the required flowRegion
> and a flowPara (which seems to be allowed by my interpretation of the spec,
> Am I reading it wrong?) no text is rendered.
> >
> > If I nest the flowPara inside a flowDiv first, it works fine, which also
> is fine according to the spec.
> >
> > The real problem for me comes down to the fact that Inkscape doesn't seem
> to output the flowDiv, where as the other editors we've been using in the
> past do.  I was tracking down the various bits of info to submit it as a bug
> to Inkscape but the spec seems to indicate the bug is in Batik.
> >
> > Anyone have any thoughts as to fixing this?  Doesn't seem like it should
> be too much of a fix for someone with knowledge of the internals, or is
> there a reason that it works like it does?
> >
> > Note: The spec I'm refering to is:
> http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html  Again, feel free to
> correct me if I'm wrong.
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
>

Re: flowRoot doesn't seem to handle flowPara children properly

Posted by David Wimsey <dw...@rtsz.com>.
Again, attachment ... I should quit now.


Re: flowRoot doesn't seem to handle flowPara children properly

Posted by th...@kodak.com.
Hi David,

David Wimsey <dw...@rtsz.com> wrote on 05/06/2010 05:57:47 PM:

> flowRoot doesn't seem to handle flowPara children properly
> 
> It would appear that if I create a flowRoot with the required 
> flowRegion and a flowPara (which seems to be allowed by my 
> interpretation of the spec, Am I reading it wrong?) no text is rendered.

   The spec has changed since the implementation was written.
Originally a flowDiv was required to hold the flowPara elements.

> Anyone have any thoughts as to fixing this?  Doesn't seem like it 
> should be too much of a fix for someone with knowledge of the 
> internals, or is there a reason that it works like it does?

   All the code for the flowRoot traversals are in:
batik.bridge.svg12.SVGFlowRootElementBridge

   It makes the code simpler that there can only be one
flowDiv and that all of the flowPara elements are contained
in it.  It might not be to bad to adjust the code to search
the whole flowRoot element and collect flowRoot and flowPara
elements.  The big question is would things do the right
thing with the nested block elements...