cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: javascript collection for cocoon
Date Wed, 01 Sep 2004 11:57:10 GMT
Thanks Tibor

I assume that in the second function, if the
document is non-existent, that the return
will be false....


>>> t.katelbach@systheo.com 2004/09/01 01:38:44 PM >>>
check out the org.w3c.dom Classes they are really usefull,
as well as javascript inbeded DOM manipualtion Classes

Maybe this can help you 

>function createDocument(uri, "<root/>")
function createDocument(uri, nodename){   
    //Construct DOM document
    var document =createDocument();
        var r = document.createElement(nodename); 
        document.appendChild(r);
//then save it to DB or else where through pipeline or File Class
}

//this only makes sure the document contains Nodes
function isDocument(uri){
var document = loadDocument(uri);

return document.hasChildNodes();
 } 


Tibor


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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Mime
View raw message