Re: [dom4j-dev] How to create a default namespace (without a prefix)?

2003-02-19 Thread James Strachan
How to create a default namespace (without a prefix)? To create a namespace with no prefix... Namespace namespace = Namespace.get( "someURL" ); or with a prefix Namespace namespace2 = Namespace.get( "myPrefix", "someURL" ); James --- http://radio.weblogs.com/0112098/ - Original Message

Re: [dom4j-dev] huge dom

2003-02-19 Thread James Strachan
First off there's an FAQ entry http://dom4j.org/faq.html on How does dom4j handle very large XML documents? http://dom4j.org/faq.html#How%20does%20dom4j%20handle%20very%20large%20XML%2 0documents? which essentially means you can process the document in a 'row by row' kinda way rather than wait

Re: [dom4j-dev] Validate method of SAXValidator

2002-12-16 Thread James Strachan
Title: Validate method of SAXValidator You're best course of action is to try using JARV to perform the validation - this avoids turning a Document into text so that it can be reparsed again with valiation on.   There's a demo of using JARV (and Sun's MSV implementation of JARV) in the sample

Re: [dom4j-dev] XMLWriter && Attributes with \0 ... :/

2002-12-16 Thread James Strachan
How does the \0 get into the String in the first place? This is an invalid XML String which preferably you should filter out before adding it to dom4j. Sure dom4j could check every character of every String that gets added to a document, though it'd add considerable overhead - so I'd prefer this to

Re: [dom4j-dev] XML comments

2002-11-26 Thread James Strachan
From: "Barry Andrews" <[EMAIL PROTECTED]> > Hi, > There seems to be no way to remove or modify Comments of a Document > either in the org.dom4j package or the org.w3c.dom package. It seems that > this should be pretty basic, so why are there no methods? Does anyone know > how this can be done?

Re: [dom4j-dev] fix for writing numeric entities in XMLWriter

2002-11-13 Thread James Strachan
nd you should get the new version. I'd like to get a real 1.4 release out ASAP so any early feedback will be greatly appreciated. James --- http://radio.weblogs.com/0112098/ - Original Message - From: "James Elson" <[EMAIL PROTECTED]> To: "James Strac

Re: [dom4j-dev] A new version...

2002-11-12 Thread James Strachan
From: "Carlos Barroso" <[EMAIL PROTECTED]> > Hy there. > Is there going to be a new version of dom4j in the near future? Hopefully I'll try to get a release out tomorrow. James --- http://radio.weblogs.com/0112098/ __ Do You Yahoo!? Everything y

Re: [dom4j-dev] Text encoding problem....

2002-11-06 Thread James Strachan
How are you putting txt into the attributes and how do you get it out again? Most probably its to do with the encodings you're using to output the XML. James --- http://radio.weblogs.com/0112098/ - Original Message - From: "Carlos Barroso" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Se

Re: [dom4j-dev] How to put a DOCTYPE with dom4j

2002-11-06 Thread James Strachan
From: "Carlos Barroso" <[EMAIL PROTECTED]> > Hy there. > I'm trying to create a XML document and I need to put a DOCTYPE > at the begining os the document. > > 1: > 2: > 3: ( ... ) > > How can I put line 2 in the resulting document. DocumentFactory factory = new DocumentFactory(); Document doc

Re: [dom4j-user] Re: [dom4j-dev] RE: Thread Safety

2002-10-24 Thread James Strachan
From: "David Hooker" <[EMAIL PROTECTED]> > I hope these changes can get into the code soon, and we can get a > release containing them on the website. > > When is the next release? How about we add your patches, test it out and then do a release? James --- http://radio.weblogs.com/0112098/ _

Re: [dom4j-user] RE: [dom4j-dev] RE: Thread Safety

2002-10-23 Thread James Strachan
From: "David Hooker" <[EMAIL PROTECTED]> > BTW, the weird exception I see, which I've now also seen on single-cpu > machines usually looks something like this: > > javax.xml.transform.TransformerConfigurationException: > org.xml.sax.SAXException: Invalid Node in DOM4J content: > [org.dom4j.tree.Def

Re: [dom4j-user] Re: [dom4j-dev] RE: Thread Safety

2002-10-23 Thread James Strachan
Great stuff David. Either you can just mail the patches to the list and someone will commit them, or I can give you CVS access if you wish to modify CVS directly? James --- http://radio.weblogs.com/0112098/ - Original Message - From: "David D. Lucas" <[EMAIL PROTECTED]> To: "Jim Brain"

[dom4j-dev] daily build updated...

2002-09-24 Thread James Strachan
The daily build hasn't been running for some time. The daily build is now up to date with all the recent patches and fixes that have been added over the last couple of months. I'd like to get a firm 1.4 release out by the end of the week, then from 1.5 onwards the build process should hopefully b

[dom4j-dev] Re: Fixed issue with default namespace redeclaration in XMLWriter

2002-09-23 Thread James Strachan
Hi Steen From: "Steen Lehmann" <[EMAIL PROTECTED]> > Hi James, > > Just wanted to let you know that I've checked in a fix to the issue > with default namespace redeclaration, as well as a test case that > verifies the fix. > > Basically, if you took the document: > > > > > > and serialized i

Re: [dom4j-dev] HELP

2002-07-13 Thread James Strachan
From: "Suryanarayana Renduchintala" <[EMAIL PROTECTED]> > Hey, > I am wondering , is there any way to select nodes that does not > satisfy a particular xpath expression?. please help me asap.Thanks .. Could you be more specifc, like give an example? e.g. /foo/*[name() != 'foo'] Also remem

Re: [dom4j-dev] JAXP via reflection????

2002-07-08 Thread James Strachan
Title: JAXP via reflection - Original Message - From: Rathore, Ritesh (GEA, TEMP, 096462) To: James Strachan ; [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 2:55 PM Subject: RE: [dom4j-dev] JAXP via reflection On my system (SunOS 5.6) there is

Re: [dom4j-dev] JAXP via reflection????

2002-07-02 Thread James Strachan
(GEA, TEMP, 096462) To: James Strachan ; [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 12:20 AM Subject: RE: [dom4j-dev] JAXP via reflection I am using latest xerces.jars (version 2.0.2) and jaxp.jar (java_xml_pack-summer-02, version 1.2) files and same are i

Re: [dom4j-dev] XPath and backed List's

2002-06-30 Thread James Strachan
As bob said, the List isn't 'backed' however... From: "Field, Richard" <[EMAIL PROTECTED]> > We've just started using dom4j and really like it a great deal. One thing > has us confused, however. > > We'd like to use the "backed List" concept to replace nodes/elements in the > document by manipul

Re: [dom4j-dev] JAXP via reflection????

2002-06-30 Thread James Strachan
Title: JAXP via reflection The warning usually means that some classloading issues occurred. This can happen if you have an old 1.0.x version of JAXP, or if the JAXP classes were found on the classpath but that no JAXP compliant parser was found.   So if you get a recent distribution (1.1

Re: [dom4j-dev] XML java server - reading + writing XML to socket

2002-06-21 Thread James Strachan
From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]> > Maybe I did not make clear the solution I used. > > It IS possible to parse an XML stream coming from a socket WITHOUT knowing > its length. Not without making some assumptions about what the XML looks like. > What you need to do (I can post the

Re: [dom4j-dev] XML java server - reading + writing XML to socket

2002-06-21 Thread James Strachan
From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]> > Not really, reading from a socket you do not know whan the document is finished > You really need to use a SAXDriver to parse the data stream logically and > detect the logical end of file. > As far as I understand this is the only option available.

Re: [dom4j-dev] fix for writing numeric entities in XMLWriter + perfomance issue

2002-06-21 Thread James Strachan
From: "Mike Skells (ebizz-consulting)" <[EMAIL PROTECTED]> > Shouldn't we have some other entites in there as well > E.g. " dom4j should already be handling the standard entities correctly I think. & " < > etc. > Also as a performance issue (and off topic) I noticed that the XMLWriter > seems v

Re: [dom4j-dev] XML java server - reading + writing XML to socket

2002-06-21 Thread James Strachan
Thanks for your mail; thats nice to know. Another way is to read the entire document buffer into memory first then use a StringReader or ByteArrayInputStream to parse the document. James - Original Message - From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Fri

[dom4j-dev] Re: [dom4j-user] Converting dom4j to saxon tree

2002-06-18 Thread James Strachan
ource = new DocumentSource(document); TinyBuilder builder = new TinyBuilder(); return builder.build(source); James - Original Message - From: David Hooker To: 'James Strachan' ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:53 PM Subject: RE: [dom4j-user] Conv

Re: [dom4j-dev] dom4j update...

2002-06-18 Thread James Strachan
From: "Carlos Barroso" <[EMAIL PROTECTED]> > Can someone tell me when is the next dom4j update? Its gonna be really soon; within the next week or so. Am half way through Maven-izing the build processs so we'll have a nice shiny new website too. James ___

Re: [dom4j-dev] New SAXReader method...

2002-06-18 Thread James Strachan
There's a helper method Document doc = DocumentHelper.parseText( ""); James - Original Message - From: "Carlos Barroso" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 18, 2002 4:10 PM Subject: [dom4j-dev] New SAXReader method... > Hy there. > Why doesn't the SAXRea

[dom4j-dev] Re: [dom4j-user] Converting dom4j to saxon tree

2002-06-14 Thread James Strachan
Title: Message How about using the JAXP API?   Document doc = ...; Source source = new DocumentSource( doc );   see the end of the quick start guide for more details...   http://dom4j.org/guide.html James - Original Message - From: David Hooker To: [EMAIL PROTECTED]

Re: [dom4j-dev] Re: [Fwd: Re: [dom4j-user] given a Node, can i get its original position information?]

2002-06-07 Thread James Strachan
Hi Donald Thanks for the patch! This is great. I recently got a patch from Nicholas as well, who tried to implement this feature too. I'll go through both of your patches and try combine them together and check them into CVS. I'll mail again when its done... James - Original Message - F

Re: [dom4j-dev] API status...

2002-06-04 Thread James Strachan
The 1.4 release should be out pretty soon. We're just in the middle of Maven-iziing the project so that it will use the Maven build process. Once thats done the 1.4 release should go out http://jakarta.apache.org/turbine/maven/ The API is pretty stable now. Most of the work is on extra featu

Re: [dom4j-dev] Extracting Information from XMLSchemas

2002-05-30 Thread James Strachan
An XML Schema file is an XML document, so you can parse it and process it (say via XPath) like any other document. http://dom4j.org/guide.html If its any help, the XML Schema Data Type support has a class called org.dom4j.datatype.SchemaParser that you might find interesting to look at the sourc

Re: [dom4j-dev] BackedList::add()

2002-05-30 Thread James Strachan
Hi Andy Thanks for this patch! Well found. Sorry this took a little time to apply and test. I made a minor modification to your patch, where the code now tests the index to be >= 0 and <= size() first and throws IndexOutOfBoundsException as per the List javadoc. By the time you get this mail th

Re: [dom4j-dev] A bug in DefaultElement.getNamespaceForPrefix method?

2002-05-16 Thread James Strachan
Hi Kohsuke This was certainly by mistake; it is indeed a bug. I've patched the code - thanks for spotting it. Its fixed now in CVS. I'll try get the daily build updated soon (there's a problem with it right now). James - Original Message - From: "Kohsuke Kawaguchi" <[EMAIL PROTECTED]> To

Re: [dom4j-dev]

2002-05-10 Thread James Strachan
Hi Toby FWIW I use cygwin from RedHat which comes with CVS and SSH which all work nicely together. Its a point and click thing to install - very nice. http://sources.redhat.com/cygwin/ Then I just set CVS_RSH=ssh and do a checkout and it works nicely. cvs [EMAIL PROTECTED]:/cvsroot/dom4j co do

Re: [dom4j-dev] persistance package

2002-05-07 Thread James Strachan
From: "Mike Skells (ebizz-consulting)" <[EMAIL PROTECTED]> > > Hi, > I noticed the org.dom4j.persistence package with interest. It there any > examples of use/documentation I know Toby was working on that. Toby? James _ Do You Yahoo!? Ge

Re: [dom4j-dev] generating a QName

2002-05-01 Thread James Strachan
From: "Mike Skells (ebizz-consulting)" <[EMAIL PROTECTED]> > HI James, > I'm not sure that I understand the problem that you are describing related > to the Xincludes > Are you talking about a specific implementation of Element, or some Xpath > description. I was taking XIncludes to be an example

Re: [dom4j-dev] generating a QName

2002-05-01 Thread James Strachan
ew document so further modifications via code will use the same factory. So preseving the setDocumentFactory() on a Document is a good thing I think, though not on other nodes. James - Original Message - From: "Mike Skells (ebizz-consulting)" <[EMAIL PROTECTED]> To: "Dennis

Re: [dom4j-dev] generating a QName

2002-04-30 Thread James Strachan
From: "Dennis Sosnoski" <[EMAIL PROTECTED]> > I hadn't considered the extra instance data issue - looking at the code > I see you've avoided storing a reference to the document and instead > just walk up the tree on a getDocument() call. > > But the QName *does* store a reference to the documentFa

Re: [dom4j-dev] generating a QName

2002-04-30 Thread James Strachan
think this would make the API much cleaner so think we should do it. James - Original Message - From: "Dennis Sosnoski" <[EMAIL PROTECTED]> To: "Mike Skells (ebizz-consulting)" <[EMAIL PROTECTED]> Cc: "James Strachan" <[EMAIL PROTECTED]>; <

Re: [dom4j-dev] Datatypes Library

2002-04-26 Thread James Strachan
The MSV library provides an API to create new data types; you can then create your own data type schemas and validate XML using MSV, or a combination of MSV and dom4j if you wish. James - Original Message - From: "LUISPENYA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April

Re: [dom4j-dev] generating a QName

2002-04-23 Thread James Strachan
Hi Mike   BTW I often find this HTML mail goes wonky ;-) - Original Message - From: Mike Skells (ebizz-consulting) To: [EMAIL PROTECTED] Sent: Saturday, April 20, 2002 11:03 PM Subject: [dom4j-dev] generating a QName Hi, I was tidying some cod

Re: [dom4j-dev] Bug in XmlParser

2002-04-19 Thread James Strachan
Hi James I finally got around to fixing this bug. Its now in CVS and the daily build. Sorry it took so long to apply the patch. James - Original Message - From: "James Dodd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 4:15 AM Subject: [dom4j-dev] Bug in Xm

[dom4j-dev] Performance of dom4j & Jaxen versus Xerces & Xalan

2002-04-19 Thread James Strachan
Please forgive this cross-post but I thought many of you would find this interesting. Jean-Jacques Dubray has kindly provided us with the performance study he and his colleagues carried out to analyse the performance of dom4j & Jaxen versus Xerces & Xalan. The study, source code, data and results

[dom4j-dev] Re: [dom4j-user] Bug with attributes starting with underscore?

2002-04-19 Thread James Strachan
Hi Tom Sorry for the cross-post, just thought I'd keep everyone updated. Yes there indeed was a bug with XPaths where element or attribtue names started with an underscore. It turned out to be a minor issue in the SAXPath lexer of the XPath expressions. I've patched it in SAXPath and there are no

Re: [dom4j-dev] XSL and null attributes

2002-04-12 Thread James Strachan
Hi Dave - Original Message - From: David Frankson To: [EMAIL PROTECTED] Sent: Saturday, April 06, 2002 6:56 PM Subject: [dom4j-dev] XSL and null attributes I have found that if you use the statement       testElement.addAttribute("test", null);

Re: [dom4j-dev] JSR query

2002-04-11 Thread James Strachan
- Original Message - From: "Harikrishna Neerkaje" <[EMAIL PROTECTED]> > Hi, > As per the comparisons shown between various XML Object Models on your site > it appears that dom4j is the best available. > If this is the case why is dom4j not being pushed in the JCP as a jsr > instead of jdom

Re: [dom4j-dev] HTMLWriter.java - use new HEAD, version 1.12

2002-04-11 Thread James Strachan
Hi Laramie From: "Laramie Crocker" <[EMAIL PROTECTED]> > > I updated HTMLWriter.java. I had forgotten to clean out my jre/lib/ext dir > and had a dependency. > It is fixed in version 1.12 > > I ran build test-report, and it's complaining about > "Test org.dom4j.TestEmbeddedHandler failed".

Re: [dom4j-dev] WBXML for dom4j?

2002-04-08 Thread James Strachan
Hi Ken From: "Meltsner, Kenneth" <[EMAIL PROTECTED]> > There's a compacted binary version of XML for wireless (and other > applications) called WBXML. As far as I can see, the only implementation of > this as open source Java is in kxml (www.kxml.org, kxml.lutris.org). Is > anyone thinking abou

Re: [dom4j-dev] HTMLWriter and friends updated

2002-04-08 Thread James Strachan
Hi Laramie Thanks for your changes! I'll digest them shortly - am on vacation for another week or so and am quite behind on things. Incidentally all the unit test cases are in src/test/org/dom4j/*/Test*.java if you want to add any. Then the ant target 'test-report' will generate a nice spiffy HT

Re: [dom4j-dev] Bug in XmlParser

2002-03-27 Thread James Strachan
Hey James Great to hear from you again - I'll mail you offlist to let you know what I'm up to these days ;-) By all means apply the fix to CVS yourself if you like - I trust you ;-). I'm at JavaOne right now (am talking today too so am a bit nervous) so will be pushed for time until next week.

[dom4j-dev] Re: dom4j: how to use HTMLWriter to print pre, script and style tags correctly?

2002-03-19 Thread James Strachan
Hi Laramie I'm CC'ing the dom4j-dev list to see if others have any ideas. You raise an interesting problem that I'd not considered before. Maybe the XMLWriter and HTMLWriter could be refactored a bit so that the trimming mode is enabled/disabled based on which element its inside. e.g. the Output

[dom4j-dev] ANNOUNCE: dom4j 1.3 released

2002-03-13 Thread James Strachan
The new release and further documentation can be found at:- http://dom4j.org This is primarily a bug fix release. For details of the bug fixes in this release please see http://dom4j.org/status.html James _ Do You Yahoo!? Get your free

Re: [dom4j-dev] How to build and run dom4j sample programs

2002-03-12 Thread James Strachan
To compile the samples try the Ant target 'samples' So build samples To run the JUnit test cases and produce a HTML report try build test-report Or to get a list of common targets try build usage It might be worth taking a read of Ant - its a Java & XML alternative to Make http://jakarta.a

Re: [dom4j-dev] DefaultXPath.matches is still broken

2002-03-12 Thread James Strachan
Hey Mike   I've added this test case to CVS in src/test/org/dom4j/TestXPathBug. The problem was the XPath.matches() method was returning true if anything was found. Now the source node must be returned in the XPath result set for the matches() to return true.   I've patched the code and check

Re: [dom4j-dev] [ dom4j-Bugs-520143 ] IndexOutOfBoundsException

2002-02-19 Thread James Strachan
I added a test case to org.dom4j.TestXPathBug called testStefan() which demonstrated the bug, then applied this patch and it worked fine. Thanks Stefan. This is now in CVS and is available in the daily build. James - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Se

Re: [dom4j-dev] Issue with default namespace declaration on element in other ns

2002-02-15 Thread James Strachan
Hi Steen I think this sounds like a correct analysis of the bug to me. Wanna right a little JUnit test case to prove its a bug, then when it gets fixed we know its really fixed and that we won't break it again? If not let me know and I'll dive in and help. Thanks James - Original Message --

[dom4j-dev] ANNOUNCE: dom4j 1.2 released

2002-02-14 Thread James Strachan
dom4j is a simple and flexible open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework with full integration with DOM, SAX and JAXP. The new release and further documentation can be found at:- http://dom4j.org This release includes:- *

Re: [dom4j-dev] org.w3c.dom.Document

2002-02-10 Thread James Strachan
Hi 'Spam Cut' In the org.dom4j.io package there is a DOMReader and DOMWriter to allow you to read and write to a W3C DOM Document to/from a dom4j document. If you're using JTidy there's also a sample program in dom4j/src/samples/JTidyDemo.java that shows how to use JTidy together with dom4j. Pr

[dom4j-dev] Re: [dom4j-user] XMLWriter bug !!?

2002-02-10 Thread James Strachan
Hi Manfred I hope you don't mind, I CC'd the dom4j-dev list so this response gets archived... - Original Message - From: "Manfred Lotz" <[EMAIL PROTECTED]> > Hi James, > > After further testing I found that we now have a new bug in the > XMLWriter class. > > Using the modified XMLWriter

Re: [dom4j-dev] Easier namespace xpath handling

2002-02-01 Thread James Strachan
Hi Chris - Original Message - From: "James Strachan" <[EMAIL PROTECTED]> > Hey Chris > > Just a thought, what if DocumentFactory had a way of > registering a NamespaceContext or a namespace URI Map > with it, then you could register your normal > names

Re: [dom4j-dev] Some ToDo's in the Datatype package

2002-02-01 Thread James Strachan
Hey Stefan Thanks for the patches! I've applied them in CVS. Once the daily build is working again it'll appear in the daily build also. Would you like to be a committer so you can add patches to the datatype package straight into CVS if you find any other areas it can be fixed or enhanced? Jam

Re: [dom4j-dev] Some ToDo's in the Datatype package

2002-02-01 Thread James Strachan
Hey Stefan Thanks for the patches! I've applied them in CVS. Once the daily build is working again it'll appear in the daily build also. Would you like to be a committer so you can add patches to the datatype package straight into CVS if you find any other areas it can be fixed or enhanced? Jam

Re: [dom4j-dev] Patch for DOMElement and DOMDocument

2002-02-01 Thread James Strachan
Hi Maarten Sorry for the huge delay getting around to your patch. I've applied it now in full - sorry it took so long to verify. I couldn't use 'patch' to apply your patches (which is one of the feeble excuses of why its taken so long) so I ended up having to do it by hand. I'd appreciate you ve

Re: [dom4j-dev] Problem with UserData{Element,Attribute}

2002-02-01 Thread James Strachan
Hi Vivek - Original Message - From: "Vivek Sahasranaman" <[EMAIL PROTECTED]> > Hi : > I'm trying to use a Dom4J DOM adorned with User defined objects > (UserDataElement) > I tried to add an attribute to a UserDataElement (org.dom4j.util) > after the DOM was created, and found that it

Re: [dom4j-dev] Problem with default namespace (no prefix) and XPATH

2002-01-17 Thread James Strachan
Hi Juergen I simply must add this to the FAQ, its one of those questions that keeps coming up. The answer is that you were on the right track with the setNamespaceURIs. Though in XPath expressions you must use a prefix. Note that the prefix is irrelevant and syntax sugar - what matters is the l

Re: [dom4j-dev] Easier namespace xpath handling

2002-01-17 Thread James Strachan
Hey Chris Just a thought, what if DocumentFactory had a way of registering a NamespaceContext or a namespace URI Map with it, then you could register your normal namespaces once and never have to worry about such things again. e.g. if you were to register your preferred namespace URIs with the s

[dom4j-dev] Re: CVS build failure

2001-12-21 Thread James Strachan
ly in CVS http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/src/java/org/dom4 j/xpp/ James - Original Message - From: "Thomas Nichols" <[EMAIL PROTECTED]> To: "James Strachan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 21, 2001 4

Re: [dom4j-dev] Fwd: Re: [xml-dev] DESIGN PROPOSAL: Java XMLIterator

2001-12-19 Thread James Strachan
Hi Thomas This looks interesting. I've been working with XPP2 quite cloely lately. CVS now has a new XPPReader that uses the XPP2 which is about 10-20% faster than SAX. Though hopefully we can make it lazy so that it only parses the parts of the document that are required. XPP2 and James Clark's

Re: [dom4j-dev] cp.bat file packaged with dom4j-1.1.zip

2001-12-19 Thread James Strachan
Hi Bill - Original Message - From: "Parker-Combes, William CECOM LRC LEO" <[EMAIL PROTECTED]> > The cp.bat file I received with dom4j-1.1.zip needs to be modified. > > The cp.bat file has one line: > set CP=%CD%\%1;%CP% > > This does not work in windows for classpath references. In wind

Re: [dom4j-dev]

2001-12-19 Thread James Strachan
The easiest way is to use the selectNodes() method to find all the elements (or their text nodes) and then extract the text from each of those. e.g. List list = myXPath.selectNodes(myDocument); for (Iterator iter = list.iterator(); iter.hasNext(); ) { Node myNode = (Node) iter.next(); St

Re: [dom4j-dev] Another XPath-question

2001-12-19 Thread James Strachan
Thats correct Jim. This page describes the changes that have been added since the 1.1 release... http://dom4j.org/todo.html James - Original Message - From: "Jim Wissner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 17, 2001 4:10 PM Subject: Re:

[dom4j-dev] new Swing TableModel...

2001-12-14 Thread James Strachan
I've just commited the code for a new Swing TableModel which allows XML information to be displayed in a Swing JTable easily. org.dom4j.swing.XMLTableModel. You can explicitly construct an XMLTableDefinition via java code (as demonstrated in samples/swing/JTableDemo.java) or an XML document can

Re: [dom4j-dev] Newbie-question

2001-12-12 Thread James Strachan
Certainly namespaces do complicate things a little. to get a handle on XPath you could try following some of the useful links on this page http://dom4j.org/index.html If you wanted to find the ImageResolution of the 'Device' in MyDeviceProfile using XPath then you could do this SAXReader read

Re: [dom4j-dev] XLink

2001-12-10 Thread James Strachan
Not that I'm aware of. What kind of thing were you thinking of? Being able to traverse an XLink somehow? James - Original Message - From: "Dane Foster" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 10, 2001 7:49 PM Subject: [dom4j-dev] XLink > Are there any develope

Re: [dom4j-dev] declaredNamespaces containing the element's namespace

2001-11-26 Thread James Strachan
declaredNamespaces then they may end up with redundant namespace declarations but this will still result in valid XML document albeit much more verbose. James - Original Message - From: Steen Lehmann To: 'James Strachan' ; [EMAIL PROTECTED] Cc: Karin Stella Mogensen Se

Re: [dom4j-dev] Using Velocity for XML transformations instead of XSL

2001-11-19 Thread James Strachan
Hi Jason - Original Message - From: "Jason van Zyl" <[EMAIL PROTECTED]> > Hello, > > I'm new to dom4j list (made my first little XML->Java Object mapping this > weekend :-)) so I was wondering if someone could point me in the right > direction as to where the XML transformation code lies

[dom4j-dev] Ant 1.4 and new cool JUnit HTML report...

2001-11-15 Thread James Strachan
For those of you who use JUnit and Ant you might not be aware that in Ant 1.4 there's a nifty new task which will generate a nice HTML report of all the unit tests that were run as part of the build. I've upgraded dom4j's build to use this feature so that the new target of 'test-report' will run

[dom4j-dev] new options to merge text nodes and strip whitespace nodes

2001-11-15 Thread James Strachan
I've added 2 new options to SAXReader to allow more optimal parsing of data-centric XML documents. (i.e. documents where the performance of parsing is more important than the perfect preservation of whitespace). In particular the common kind of XML as follows 1234 would crea

Re: [dom4j-dev] What is the best way to create a class that manag e pieces of a do cument?

2001-11-11 Thread James Strachan
in   dom4j/src/samples/   or the JUnit tests might be helpful here:-   dom4j/src/test/ James - Original Message - From: Michael Virgil To: James Strachan ; dom4j-dev Sent: Wednesday, November 07, 2001 12:27 PM Subject: RE: [dom4j-dev] What is the best way to create a

Re: [dom4j-dev] Extracting Information from XMLSchemas

2001-11-08 Thread James Strachan
Hi Chuck Thanks for spotting that one. Steen also spotted it a day or so ago, the fix is also available in CVS and the daily build. James - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 14, 2001 9:42 PM Subject: [dom4j-dev] dom4j-1.1 SAXCo

Re: [dom4j-dev] What is the best way to create a class that manage pieces of a do cument?

2001-11-05 Thread James Strachan
James, Line 296 of the released dom4j-1.1 code has a small mistake. It calls setInternalDeclarations instead of setExternalDeclarations. This doesn't show when using Crimson, but when using Xerces both internalDeclarations and externalDeclarations are set to NULL. public void endDTD() throws

[dom4j-dev] TODO list... (anyone fancy contributing?)

2001-11-02 Thread James Strachan
I've been putting together a project "to do" list in TODO.txt in the CVS repository http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/ or if you can manage this big link, here... http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/TODO.txt?rev=HEAD &content-type=text/vnd.viewcvs

Re: [dom4j-dev] stack trace code in saxreader

2001-10-29 Thread James Strachan
Hi Brian Thanks for spotting that! Whoops, that looks like something that got left in the code after a debugging run. Its gone now. I've committed the change to CVS and its available in the daily build. James - Original Message - From: "Brian W. Young" <[EMAIL PROTECTED]> To: <[EMAIL PR

Re: [dom4j-dev] getNodeValue not getting complete node value

2001-10-29 Thread James Strachan
doing something strange.   James - Original Message - From: James Strachan To: Doug Hoppes ; [EMAIL PROTECTED] Sent: Monday, October 29, 2001 5:42 PM Subject: Re: [dom4j-dev] getNodeValue not getting complete node value This sounds very wierd. It seems like you

Re: [dom4j-dev] getNodeValue not getting complete node value

2001-10-29 Thread James Strachan
Title: Message This sounds very wierd. It seems like you might have multiple text nodes to me. e.g. is there a newline between the "60" and the "113392" text in your XML document that you're parsing? That could explain why both node.valueOf( "." ) and node.getStringValue() are concatenating t

Re: [dom4j-dev] valueOf("text()") not getting full value?

2001-10-26 Thread James Strachan
this change has a big impact on anyone you could always provide your own DocumentFactory, or Element derivation to either quietly ignore null strings or swap them with empty strings as a temporary work around. James - Original Message - From: James Strachan To: Dennis Sosnoski Cc: Doug H

Re: [dom4j-dev] valueOf("text()") not getting full value?

2001-10-26 Thread James Strachan
l string so its pretty easy to wrap an extra if () around the code as follows...   String s = ...; if ( s != null ) {     element.addText( s ); }   So yes I think we should do this. James - Original Message - From: Dennis Sosnoski To: James Strachan Cc: Doug Hoppes ; [

[dom4j-dev] Re: [dom4j-user] using JDBC results with dom4j

2001-10-26 Thread James Strachan
Hi Casey A few people have been thinking about mapping a JDBC ResultSet to an XML representation lately, it was mentioned recently on the Jaxen list http://www.mail-archive.com/jaxen-interest%40lists.sourceforge.net/msg00212. html as well as on the standard JSP tag library expert group. I've a

Re: [dom4j-dev] valueOf("text()") not getting full value?

2001-10-25 Thread James Strachan
Title: Message Hi Doug   Firstly if you want the XPath string value of a node you can just call the getStringValue() method.   node.getStringValue();   Secondly the valueOf() method always returns the XPath string value of the XPath expression you give so that   node.valueOf( "'." )   should p

[dom4j-dev] Re:

2001-10-12 Thread James Strachan
add your jar to the system classpath. James - Original Message - From: Minal Ashar To: Minal Ashar ; James Strachan Sent: Friday, July 09, 1999 11:29 PM Subject: Re: Hi,   I am using dom4j-1.0 .My servlet runs on JavaWebServer2.0.Have placed the dom4j-f

[dom4j-dev] Re: servlet classloading issue

2001-10-12 Thread James Strachan
Hi Minal   I'm CC'ing the dom4j-dev list just in case anyone else gets this problem too.   Which version of dom4j are you using? And is dom4j.jar in your WEB-INF/lib directory? James - Original Message - From: Minal Ashar To: James Strachan Sent: Friday, July

Re: [dom4j-dev] Using ElementHandlers and XPath predicates simultaneously.

2001-10-09 Thread James Strachan
Hi PJ > When using the ElementHandler feature of the SAXReader, there is only a > subset of XPath available (eg no element predicates can be used). Is there > any documentation on what can and can't be used? It only supports simple, element name based addressing right now like /foo/bar > I thin

Re: [dom4j-dev] Java document model performance

2001-10-08 Thread James Strachan
- Original Message - From: "Thomas Nichols" <[EMAIL PROTECTED]> > >Yes I like this idea too and it should be fairly easy to add as a > >configurable option to dom4j's SAXReader, though hopefully this could be a > >SAX parser property so everyone can benefit. > > > >The problem is though, w

Re: [dom4j-dev] Java document model performance

2001-10-05 Thread James Strachan
Hi Dennis > I'll update the results on my web site, at least. I'll forward separately a > couple of emails from the JDOM list discussing how XMLS could be made the normal > serialization method while still allowing people to use default serialization if > they want (useful if they're associating

Re: [dom4j-dev] Java document model performance

2001-10-04 Thread James Strachan
Hi Dennis Great article! Thanks for the link - I was wondering when the new article would show up :-) Have you any plans to follow this article up showing the effects of your XMLS work on the serialization graph? Certainly as soon as I've a few cycles I want to make your XMLS the standard serial

Re: [dom4j-dev] Broken link in www.dom4j.org

2001-10-02 Thread James Strachan
Hi Roy Thanks for spotting that. I've fixed the broken link. Yes, these emails are very useful - do please keep them coming! James - Original Message - From: "Roy Bryant" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 02, 2001 6:13 AM Subject: [dom4j-dev] Broken link

Re: [dom4j-dev] Help me please.

2001-10-01 Thread James Strachan
Hi Luis It sounds like you've got an old version of SAX (SAX 1.0) on your CLASSPATH. Try putting dom4j-full.jar at the front of your CLASSPATH (its got SAX 2.0 included) and you should be fine James - Original Message - From: "Luis Miguel Vicente Mosquera" <[EMAIL PROTECTED]> To: <[EMAI

Re: [dom4j-dev] More on Context-passing

2001-09-20 Thread James Strachan
Hi Laurent Yes I think I understand the problem much better now - thanks for that. I just wondered if ModuleContext needs to implement ElementHandler at all? Would just having a ModuleStack, which just implements the stack of modules, be easier & simpler? Then different ElementHandler's could pu

Re: applet problem (was Re: [dom4j-dev] (no subject))

2001-09-20 Thread James Strachan
Hi Toby Thanks for sending me a sample applet! I've committed it to CVS in dom4j/src/samples/applets and tried it and using appletviewer at least, it appears dom4j and XPath (and so Jaxen too) works fine in Applets. James - Original Message - From: <[EMAIL PROTECTED]>

Re: [dom4j-dev] Passing Context information to the ElementHandler

2001-09-20 Thread James Strachan
Hi Laurent That sounds a reasonable idea - I just wondered what if you need multiple context objects or better typesafety. e.g. consider ... where you want to know the parent foo and bar. Another way to tackle the problem could be for the ElementHandler objects

applet problem (was Re: [dom4j-dev] (no subject))

2001-09-20 Thread James Strachan
I've applied a patch to DocumentFactory which should fix this problem - its in CVS now. It would be nice to create a test applet to test this out to be sure it works. Any takers? Toby could the applet you're working on be refactored in any way into the src/samples/applet area? James - Origina

  1   2   >