[xmlc] Re: Re: Re: Re: Re: Re: Accessing the body in a Document
Franck Routier <[email protected]> Wed, 16 Jun 2010 17:21:54 +0200
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Organization | Axège sarl |
| Message-ID | <1276701714.4448.53.camel@franck-laptop> |
This is a multi-part message in MIME format... ------------=_1276701720-5928-2203 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Jake, this makes things much more clear for me. On my side, I found the problem, and it lies in Barracuda... more specifically, it lies in the BTemplate component. On rendering, HTMLTemplateRenderer will call TemplateHelper.render(vc) 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... 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 have some BTemplateModel that return nodes that in turn contain directives for other BTemplate (amazing this works, Christian Cryder did marvels). 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. 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. I'll keep you informed of my success. Thanks a lot for your help, Franck 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, > >=20 > >> Which parser are you using? Are you using the XML or HTML parser? > >=20 > > I am using the xml parser, not NekoHTML. > >=20 > > I'm not sure though how this is triggered, I think it comes from the > > -dom xhtml in my options.xmlc file. > >=20 >=20 > "-dom xhtml" is actually a shortcut for... >=20 > -domfactory org.enhydra.xml.xhtml.XHTMLDomFactory >=20 > The one thing I can't remember is whether it changes the default parser= ? Can=20 > you ensure that you are using a validating parser by specifying?... >=20 > -parser xerces >=20 > The other non-validating option (which is, generally, the default) is..= . >=20 > -parser nekohtml >=20 > The other thing that I believe can influence this stuff is.... >=20 > -docformat [xml | html | auto] >=20 > When the docformat is "auto" (the default), XMLC checks the document fo= r the=20 > namespace.... >=20 > xmlns=3D"http://www.w3.org/1999/xhtml" >=20 > If that exists, then it auto-detects the docformat to be "xml", otherwi= se it=20 > detects it to be "html". To be extra sure you are using the validating= XML=20 > parser, please specify the following... >=20 > -dom xhtml > -parser xerces > -docformat xml >=20 > > 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. > >=20 >=20 > Sorry, those docs way out of date. They are from before XMLC 2.2. I'v= e made=20 > plenty of code updates, just not many doc updates. Pretty much all rec= ent=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 muc= h. >=20 > > What can be the impact of using -dom xhtml versus -dom lazydom or -do= m > > xerces options ? > >=20 >=20 > "xhtml" indicates to use the custom XHTML DOM that XMLC provides. "xer= ces"=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 XMLC= =20 > provides. Some other options trigger a few other things. >=20 > When "-dom xerces" is combined with "-docformat html" and/or "-parser=20 > nekohtml", it will trigger usage of the Xerces HTML DOM. When "-dom la= zydom"=20 > is defined (along with the other mentioned options), the custom HTML-ba= sed=20 > LazyDOM is used. >=20 > Note that the default DOM in Xerces2 is a deferred node DOM, similar in= style=20 > to the custom XMLC LazyDOM, though implemented very differently. I hav= e not=20 > performed tests, but I believe that this reduces the necessity for usin= g=20 > XMLC's own LazyDOM. >=20 > >=20 > >Franck > > >=20 > Jake > pi=C3=A8ce jointe document texte brut (message-footer.txt) > -- > You receive this message as a subscriber of the [email protected] mailing li= st. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=3Dhelp > OW2 mailing lists service home page: http://www.ow2.org/wws ------------=_1276701720-5928-2203 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 ------------=_1276701720-5928-2203--