[xmlc] Re: Re: Re: Re: Re: Re: Re: Accessing the body in a Document

Jacob Kjome <[email protected]> Wed, 16 Jun 2010 23:47:09 -0600
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1276750178-5928-2229
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


Thanks for the update, Franck.  I'm glad it wasn't some weird, hard-to-re=
produce,
DOM bug.  Yep, Christian did write some pretty amazing stuff.  Understand=
ing it is
a bit tough sometimes, though.

At some point I began to feel like the complexity of Barracuda was becomi=
ng too
great (maybe just my ability, or lack thereof, to grok the codebase?).  S=
o, I
decided to spend some more time at the lower level of XMLC.  The next rel=
ease of
XMLC will support some stuff (such as localization without the need to co=
mpile
localized classes) which should serve to relieve Barracuda of some comple=
xity, and
allow it to concentrate more on the higher level component model.  I can'=
t provide
a release date, partly because I have no idea when OW2 is going to fix th=
e XMLC
SVN which has been broken [1] for just over a week now?  Ugh!!!!

Anyway, I hope you can find a good solution to the BTemplate issue.


[1]
http://forge.ow2.org/tracker/index.php?func=3Ddetail&aid=3D315110&group_i=
d=3D1&atid=3D100001


Jake

On 6/16/2010 9:21 AM, Franck Routier wrote:
> Thanks Jake,
>=20
> this makes things much more clear for me.
>=20
> On my side, I found the problem, and it lies in Barracuda... more
> specifically, it lies in the BTemplate component.
>=20
> On rendering, HTMLTemplateRenderer will call TemplateHelper.render(vc)
>=20
> This method then will... remove the nodes from the document, then copy
> them back, one by one, but first giving a change to every child
> component to render first...
>=20
> The objective (as far as I understand it) is to be able to have
> BTemplate within BTemplate, and to parse the directives that can be
> contained by a node returned by a directive. This works fine, and I hav=
e
> some BTemplateModel that return nodes that in turn contain directives
> for other BTemplate (amazing this works, Christian Cryder did marvels).
>=20
> But the conterpart is that components that are children of a BTemplate
> only have access to a "work in progress" document, with only some node
> added back (the head for exemple is added back first, that why I could
> acces it), until the first BTemplate (and all its children) have
> finished rendering.
>=20
> So I will try to see if I can give access to the "MasterTemplate" (the
> original one, before removing the nodes) to the children components, in
> case they need that (as in my script components exemple), via the
> ViewContext for example.
>=20
> I'll keep you informed of my success.
>=20
> Thanks a lot for your help,
>=20
> Franck
>=20
>=20
> Le mercredi 16 juin 2010 =C3=A0 09:56 -0500, Jacob Kjome a =C3=A9crit :
>> On Wed, 16 Jun 2010 11:36:16 +0200
>>   Franck Routier <[email protected]> wrote:
>>> Hi,
>>>
>>>> Which parser are you using?  Are you using the XML or HTML parser?
>>>
>>> I am using the xml parser, not NekoHTML.
>>>
>>> I'm not sure though how this is triggered, I think it comes from the
>>> -dom xhtml in my options.xmlc file.
>>>
>>
>> "-dom xhtml" is actually a shortcut for...
>>
>> -domfactory org.enhydra.xml.xhtml.XHTMLDomFactory
>>
>> The one thing I can't remember is whether it changes the default parse=
r?  Can=20
>> you ensure that you are using a validating parser by specifying?...
>>
>> -parser xerces
>>
>> The other non-validating option (which is, generally, the default) is.=
..
>>
>> -parser nekohtml
>>
>> The other thing that I believe can influence this stuff is....
>>
>> -docformat [xml | html | auto]
>>
>> When the docformat is "auto" (the default), XMLC checks the document f=
or the=20
>> namespace....
>>
>> xmlns=3D"http://www.w3.org/1999/xhtml"
>>
>> If that exists, then it auto-detects the docformat to be "xml", otherw=
ise it=20
>> detects it to be "html".  To be extra sure you are using the validatin=
g XML=20
>> parser, please specify the following...
>>
>> -dom xhtml
>> -parser xerces
>> -docformat xml
>>
>>> After looking at the documentation of xmlc online
>>> (http://xmlc.ow2.org/doc/doc/xmlc/user-manual/xmlc-command.html) I wa=
s a
>>> bit surprised that this option is not mentionned. Only lazydom and
>>> xerces are mentionned as -dom possible values.
>>>
>>
>> Sorry, those docs way out of date.  They are from before XMLC 2.2.  I'=
ve made=20
>> plenty of code updates, just not many doc updates.  Pretty much all re=
cent=20
>> documentation has been captured in the release notes for each release.=
  Not=20
>> ideal, but without help the current situation is unlikely to change mu=
ch.
>>
>>> What can be the impact of using -dom xhtml versus -dom lazydom or -do=
m
>>> xerces options ?
>>>
>>
>> "xhtml" indicates to use the custom XHTML DOM that XMLC provides.  "xe=
rces"=20
>> indicates to use the standard XML-based DOM that comes with the Xerces=
=20
>> library.  "lazydom" indicates to use the custom XML-based DOM that XML=
C=20
>> provides.  Some other options trigger a few other things.
>>
>> When "-dom xerces" is combined with "-docformat html" and/or "-parser=20
>> nekohtml", it will trigger usage of the Xerces HTML DOM.  When "-dom l=
azydom"=20
>> is defined (along with the other mentioned options), the custom HTML-b=
ased=20
>> LazyDOM is used.
>>
>> Note that the default DOM in Xerces2 is a deferred node DOM, similar i=
n style=20
>> to the custom XMLC LazyDOM, though implemented very differently.  I ha=
ve not=20
>> performed tests, but I believe that this reduces the necessity for usi=
ng=20
>> XMLC's own LazyDOM.
>>
>>>
>>> Franck
>>>
>>
>> Jake
>> pi=C3=A8ce jointe document texte brut (message-footer.txt)
>> --
>> You receive this message as a subscriber of the [email protected] mailing l=
ist.
>> To unsubscribe: mailto:[email protected]
>> For general help: mailto:[email protected]?subject=3Dhelp
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>=20
>=20
>=20
>=20

------------=_1276750178-5928-2229
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

------------=_1276750178-5928-2229--