[xmlc] Re: [Will be fixed in XMLC 2.3.2] Re: Re: Re: Re: Re: Re: LazyDom Use Throws Exception

Jacob Kjome <[email protected]> Fri, 04 Dec 2009 02:31:59 -0600
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1259915303-8018-2763
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

FYI,

I figured out the fix for this issue.  When I release XMLC 2.3.2, the LazyDOM will 
behave just as the standard Xerces DOM does in regard to duplicate Ids.  Can't 
promise a date for release, but I hope it will be prior to X-mas.  It all depends 
on how much time I get to dedicate to applying the finishing touches.

Jake


On 7/10/2009 12:13 PM, Henry Stanaland wrote:
>> You can never assume that a child node is not going to be text.  This is why Id's
>> are convenient.
>
> The issue was in a special-case utility function that worked on
> generic row elements, so id's couldn't be used.  In any case, I think
> I'll just explain to the team to watch out for this unsafe code during
> the migrations and to fix as needed.
>
>> I encourage you to make your code
>> safer rather than modifying the markup to make the unsafe code work, as the markup
>> could change at any time and this problem will rear it's ugly head once again.
>
> I had the same conclusion and did modify the code for safety.  I just
> modified the code to find the first actual<TD>  element, since that is
> what it is looking for.
>
>> Both elements with the duplicate Ids exist at parse time.  It's not
>> until just before the document is stored in the deferred parsing cache that the
>> DOM edits are made to remove the "RemoveMe" element[s].
>
> This is what I assumed.
>
>> Since they are merely mockup data, there's no reason to apply a duplicate Id.
>> Save that only for the templated element and you'll no longer have an issue
>> regardless of whether a fix is discovered.
>
> I agree, but I have several large and small projects to migrate and
> don't know what other kinds of shenanigans the programmers came up
> with over the years.  The good thing is that I've found a good way to
> narrow down any issues in the templates.  I just load the pages into
> the XMLC tomcat example and remove sections until I've narrowed down
> the problem area.
>
> Again, thanks for your time and help.
>
> -Henry

------------=_1259915303-8018-2763
Content-Type: text/plain; charset="UTF-8"; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: quoted-printable


--
You receive this message as a subscriber of the [email protected] mailing list=
.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=3Dhelp
OW2 mailing lists service home page: http://www.ow2.org/wws

------------=_1259915303-8018-2763--