Re: Bug in parser?

2003-05-27 Thread Michael Rafael Glavassevich
Hi Jon, You might want to check if you're passing in a non-null InputStream. I believe getResourceAsStream (unless your class was loaded by some custom ClassLoader), searches the classpath for the resource you want, so if you've only have jars in your classpath, I doubt it would search in the file

Re: Bug in parser?

2003-05-27 Thread Jon Wilmoth
I've tried simplifying the test by attempting to parse a document without a dtd reference. sample The java code I use, which still results in an exception is: log.debug("TRYING TO PARSE SIMPLE DOCUMENT..."); SAXBuilder builder = new SAXBuilder(false); builder.setIgnoringElementContentWhitespa

Re: XML schema validation performance (precompilation?)

2003-05-27 Thread Jeff Greif
see the xerces grammar FAQ. Jeff - Original Message - From: "Hess Yvan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 27, 2003 6:00 AM Subject: XML schema validation performance (precompilation?) > Hi, > > I have to validate many XML documents against a XML schema that

Re: parser help

2003-05-27 Thread Jeff Greif
Creating a document from a subtree and parsing it will not work if the root element of the subtree is not a legal root element of the document (doesn't have a doctype associated with it, or is not a global element in an XML Schema or something equivalent for other schema languages). If the root of

RE: Namespace problem with Xerces >2.0.1

2003-05-27 Thread Thomas Börkel
HI! Thanks for the explanation. I think I understand now both cases better. The XPathAPI is part of Xalan, but it does not do anything wrong here, right? We still need to add your code suggestion from yesterday, because the Xalan Transformer (we use that for saving to file) apparently also does

Re: parser help

2003-05-27 Thread Anthony Rabaa
Utsav Boobna wrote: Hi, Given a DOM tree I would like to check the validity of the subtree of a given node, by the parser. One way which I can think of is to write the XML document corresponding to it and then parse it. will it work? is there some better and effective way of doing i

XML schema validation performance (precompilation?)

2003-05-27 Thread Hess Yvan
Hi, I have to validate many XML documents against a XML schema that is always the same. I use the following code to do the validation for each XML document: // Get document builder factory and set its properties factory = DocumentBuilderFactory.newInstance(); factory.setAttribute("http://apache.o

parser help

2003-05-27 Thread Utsav Boobna
Hi, Given a DOM tree I would like to check the validity of the subtree of a given node, by the parser. One way which I can think of is to write the XML document corresponding to it and then parse it. will it work? is there some better and effective way of doing it ? also, at some stage

RE: Namespace problem with Xerces >2.0.1

2003-05-27 Thread Sander Bos
Dear Thomas, > It looks similar to the problem yesterday, but we fixed that > one by changing our code like you suggested, so that we "did > it right". We didn't want the Serializer to *fix* something > that we "did wrong", so we did not turn the namespace fixup on there. > > So, you are sayi

RE: Namespace problem with Xerces >2.0.1

2003-05-27 Thread Thomas Börkel
HI! Thanks for the fast response. It looks similar to the problem yesterday, but we fixed that one by changing our code like you suggested, so that we "did it right". We didn't want the Serializer to *fix* something that we "did wrong", so we did not turn the namespace fixup on there. So, yo

Re: Namespace problem with Xerces >2.0.1

2003-05-27 Thread K. Venugopal
Sander Bos wrote: Thomas , As elena and thomas mentioned you need to set  namespace  to true . I tested your program by setting xmlSerializer.setNamespaces(true); and it works fine . Regards venu Dear Thomas, We ran into another namespace problem after switching to

RE: Namespace problem with Xerces >2.0.1

2003-05-27 Thread Sander Bos
Dear Thomas, > We ran into another namespace problem after switching to > Xerces 2.4.0. We are searching a node with Xalan 2.4.1 and > then output the node as string. Xerces 2.4.0 Serializer does > not provide the full namespace information of that node, > where 2.0.1 does, so that this node

Namespace problem with Xerces >2.0.1

2003-05-27 Thread Thomas Börkel
HI! We ran into another namespace problem after switching to Xerces 2.4.0. We are searching a node with Xalan 2.4.1 and then output the node as string. Xerces 2.4.0 Serializer does not provide the full namespace information of that node, where 2.0.1 does, so that this node cannot stand alone an

RE: createElementNS() does not work as expected in new versions of Xerces (> 2.0.1)

2003-05-27 Thread Thomas Börkel
HI! Thanks for the clarification. Regards, Thomas > -Original Message- > From: Elena Litani [mailto:[EMAIL PROTECTED] > Sent: Montag, 26. Mai 2003 16:35 > To: [EMAIL PROTECTED] > Subject: Re: createElementNS() does not work as expected in > new versions of Xerces (> 2.0.1) > > > Hi T

RE: createElementNS() does not work as expected in new versions of Xerces (> 2.0.1)

2003-05-27 Thread Thomas Börkel
HI! Thanks a lot! This works. Regards, Thomas > -Original Message- > From: Sander Bos [mailto:[EMAIL PROTECTED] > Sent: Montag, 26. Mai 2003 16:02 > To: [EMAIL PROTECTED] > Subject: RE: createElementNS() does not work as expected in > new versions of Xerces (> 2.0.1) > > > > Dear Th

Re: Default values with grammars

2003-05-27 Thread Ron Rothblum
That's exactly what I did - parsed the grammar, saved it in a grammar pool and then used the appropriate property with the parser for the xml instance. The validation is done but for some odd reason I didn't get the default attributes in the DOM tree. Ron Rothblum. --