cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Dealing with XML Fragments in logicsheets
Date Thu, 05 Jul 2001 15:44:20 GMT


Thomas Klement a écrit :
> 
> Hi,
> 
> I wonder if there is a way to process xml fragments with logicsheets. For
> instance, I want to insert the fragment "person" in the following example
> into a xml database using a logicsheet (that processes xmldb:insertFragment)
> in conjunction with a helper class.
> 
> <xmldb:insertFragment collection="xmldb:dbxml:///db/mydb2">
>         <person>
>                 <fname>Thomas</fname>
>                 <lname>Klement</lname>
>                 <email type="work">klement@gmd.de</email>
>                 <address type="work">D-64293 Darmstadt</address>
>         </person>
> </xmldb:insertFragment>
> 
> The problem is "how to assign a parameter of this helper class to transport
> the content below the person tag". I didn't find any example of that.
> 
> Can anyone help, please?
> 
By "fragment", do you mean a DOM DocumentFragment ?

If so, your xmldb:insertFragment can change the XSP contentHandler to a
DOMBuilder, apply templates on its content so that it gets converted to
a DOM, and then restore the XSP contentHandler and insert the built DOM
into the database.

> Cheers,
> Thomas
> 
> ---------
> Thomas Klement
> GMD - German National Research Center
> for Information Technology
> GMD-IPSI
> PO-Box 10 01 38
> D-64201 Darmstadt
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message