Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@jakarta.apache.org Received: (qmail 73399 invoked by uid 500); 11 Sep 2001 16:48:27 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: taglibs-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list taglibs-user@jakarta.apache.org Delivered-To: moderator for taglibs-user@jakarta.apache.org Received: (qmail 81593 invoked from network); 11 Sep 2001 11:45:24 -0000 X-Apparently-From: Message-ID: <020701c13ab7$0878df90$9865fea9@spiritsoft.com> From: "James Strachan" To: References: <3B953E18.3010302@boeing.com> <002501c1398e$e285e6d0$9865fea9@spiritsoft.com> <3B9D3709.5020207@boeing.com> Subject: Re: Request for expert advice on design Date: Tue, 11 Sep 2001 12:43:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Ray ----- Original Message ----- From: "Ray Allis" > James Strachan wrote: > > Hi Ray > > > > Sorry for the delay getting back - just catching up after vacation. > > Not a problem. I hope you are refreshed and renewed. :) I was though now I've got jetlag thanks to my day job and wide awake at 5AM :-( > >>- Eventually, I'd like to do form-based database maintenance. > >> :-) The Documents are in beans, but how would a setWhatever > >> work? The present technique would be to build new or > >> replacement Documents complete using xtags and insert them > >> into the db? > >> > > > > XSLT tends to take the view that you take an existing document and create a > > whole new output document. > > > > In XTags you can actually amend an existing document iteratively - e.g. find > > all the elements with certain attribute values using XPath then add or > > delete things. So to do iterative modification to an XML document, you can > > use XTags if you like. Especially if you were doing something like NewsML > > editing, where you just want to (say) edit the title or author's name, > > there's no point creating a whole new document with XSLT just to do > > incremental changes. There's folks doing this kind of thing with XTags today > > (using documents quite like NewsML and XML CMS type stuff) > > Is there code I can look at? Incremental changes are bound to be a > major part of this application, exactly as you describe -- changing > a headline, adding a paragraph, correcting a typo ... > > Are there ways to modify an element? Or do I remove it and add a > new one? Mostly adding, replacing or removing elements right now. To do anything more complex you could always use XTags to find and iterate over nodes (say Elements) and you could add your own custom, complex changes via scriplets or beans if need be. > I see will create an element. How to I > indicate where it goes? The context from select? behaves like the XSLT tag, it just outputs an XML element to the JSP output. XTags has 3 tags that are relevant for modification of exisitng documents, , and . They are documented here:- http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html#summary I think they should do what you need - making modifications to parts of existing XML documents, using XPath to denote which bits to change or where to add new content etc. There are some test examples in the XTags examples web app in examples/web/test test_add.jsp test_remove.jsp test_replace.jsp Have a play with those and see what you think - I know of some users of XTags who find this very useful. James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com