Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Mark R. Diggory
Kris Schneider wrote: ;-) I'm not sure how I got stuck holding the bag for "physically altering the original DOM object", JXPath was your suggestion, wasn't it? That wasn't my intention, I was just showing and optional strategy. I'm always one to play Devils Advocate... ;-) Lord knows I someti

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Kris Schneider
Right. This is what I tried initially and it gave the same effect: ... <%@ page import="org.apache.commons.jxpath.ri.*" %> <%@ page import="org.apache.commons.jxpath.ri.model.*" %> ... <% JXPathContext domCtx = JXPathContext.newContext(dom); NodePointer childPtr = (NodePointer)domCtx.getPointer("r

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Kris Schneider
;-) I'm not sure how I got stuck holding the bag for "physically altering the original DOM object", JXPath was your suggestion, wasn't it? My original response, which I still stand by, was, "It sounds like you'd be better off using XSLT and the tag..." The two examples I gave below both use tr

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Mark R. Diggory
I believe you would get the parent element of the attribute and use a pointer to that Node to add the attribute. Look Over DOMNodePointer for more details. http://jakarta.apache.org/commons/jxpath/apidocs/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.html -Mark Kris Schneider wrote: T

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Mark R. Diggory
Hey, if its all in the name of presentation, then who am I to argue. But there is a conceptual dfiference your overlooking here. There is a big difference between taking a DOM and doing an xslt transform to produce new output vs. physically altering the original DOM object, The former is a "rea

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Mark R. Diggory
Murray, > "JSTL has support for common, structural tasks such as iteration and > conditionals, tags for manipulating XML documents, internationalization > tags, and SQL tags." > > "manipulating"! Clearly that was a general statement not to be taken in a "Legal sense"... it is poorly stated If yo

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Kris Schneider
It's perfectly valid to perform those tasks for the sake of presentation logic. Just because I'm manipulating an XML document doesn't mean that I'm performing business logic. Does transforming your XML data to (X)HTML qualify as business logic? As another example, an article by Bob DuCharme for XML

Re: Do Developers still use XTags?

2004-05-07 Thread Kris Schneider
I haven't used XTags that much so I can't really do a fair comparison. However, JSTL is an official Java spec and I'll hazard a guess that it's not only better supported but that you'll also find much more information about it (books, articles, etc.). If you've got a specific question about JSTL's

Re: My first SOAP

2004-05-07 Thread Kris Schneider
Don't use SOAP much (but I don't smell bad, really), but isn't that just the first child of the element? http://schemas.xmlsoap.org/soap/envelope/"; soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";> ... ... Quoting Benedetto Dell'

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Kris Schneider
That still doesn't seem to address the question about adding an attribute. If the attribute doesn't exist, you can't access it with something like domCtx.getPointer("root/child/@id"), right? I took a look at the API and this seemed to work (JSTL 1.1, Xalan 2.6.0, and Xerces 2.6.2 on TC 5.0.19): <%

My first SOAP

2004-05-07 Thread Benedetto Dell'Ariccia
Hi, I have to make a SOAP call, can you help me? I'm trying with the IO taglibs, is this the best way? For example I didn't understand where I can put the . Benny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: Adding attributes to an XML element in JSTL

2004-05-07 Thread Stefan Frank
hey, come on, this is just a jsp - you would not really want to litter your presentation layer with all sorts of business-logic: if jstl goes down this path, it will end up being a crippled version of cfml or even worse asp... Murray Lang wrote: Actually, what the Sun JSTL web page says is: "J