List Info

Thread: Include-Pattern Infinite Loop Open Issue




Include-Pattern Infinite Loop Open Issue
country flaguser name
United Kingdom
2008-04-16 16:54:19
Jason Kams:

> I'd like to address Toby Inkster's current Open Issue.
> [h
ttp://microformats.org/wiki/include-pattern-issues]
> "It's very easy for inclusions to end up as an
infinite loop. For  
> example:..."
>
> This issue is addressed by simply ignoring any includes
that reference
> an ancestor of the current node.
> [http://microformats.org/wiki/include-pattern#in_general]
> "To prevent infinite loops, if a
class="include" refers to itself or
> to an ancestor in the parse tree, then it is ignored
and has no effect
> on the parser. "
>
> Can this issue now be closed citing the page above?

There are still issues of one include including another
include which  
references the first include, but yes, preventing the
inclusion of an  
ancestor node does go a long way to a solution.

-- 
Toby A Inkster
<mailto:mailtobyinkster.co.uk>
<http://tobyinkster.co.uk
>



_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: Include-Pattern Infinite Loop Open Issue
user name
2008-04-17 09:02:01
>  There are still issues of one include including
another include which
> references the first include, but yes, preventing the
inclusion of an
> ancestor node does go a long way to a solution.

Once one replaces an include element with the referenced
subtree, then
any include in that subtree would be referencing an ancestor
if it was
referencing the original include.

The following illustrates your case:

<span id="root">
    <a class="include"
href="#child"/>
</span>
<span id="child">
    <a class="include"
href="#root"/>
</span>

But once the include replacement is done, the tree looks
like this:

<span id="root">
    <span id="child">
        <a class="include"
href="#root"/>
    </span>
</span>
<span id="child">
    <span id="root">
        <a class="include"
href="#child"/>
    </span>
</span>

At this point, we have reached a stable point and the
remaining
includes are ignored because they reference ancestors.

I suppose if this discussion goes any further it should be
moved to
the -dev list.

~Jason
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )