Re: Accessing xml prolog via SAX

2009-04-24 Thread Elliotte Harold
Do you want the declared encoding or the real encoding? If the latter, see here: http://www.ibm.com/developerworks/library/x-tipsaxxni/ -- Elliotte Rusty Harold elh...@ibiblio.org - To unsubscribe, e-mail: j-users-unsubscr...@x

Re: XQuery question

2008-12-11 Thread Elliotte Harold
ajay bhadauria wrote: Hi, I need to use Xquery in my application. I do not know whether xalan supports XQuery implementations ? If xalan does not support XQuery then what are options I have ? No, Xalan does not. Saxon is likely your best option for a standalone XQuery processor. -- Ellio

Parser does not recognize feature (http://apache.org/xml/features/xinclude)

2006-08-08 Thread Elliotte Harold
I've got a complex system (i.e. string and bailing wire) that, through Ant, is kicking up a lot of error messages like these two: [java] warning: Parser does not recognize feature (http://apache.org/xml/features/xinclude) [java] warning: Parser does not recognize feature (http://apach

Re: Is the xerces implementation of SAX thread-safe?

2006-06-26 Thread Elliotte Harold
Kemper, Stephan (external) wrote: Because there are multiple directories, I use one thread per directory and one SAXParser-object per thread. Have you tried using XMLReader instead of SAXParser? I haven't heard of any thread issues in SAXParser before, but it's got enough other design flaws

Re: Should I use SAX or DOM?

2006-05-22 Thread Elliotte Harold
Roberto Cosenza wrote: Hi. I'm writing an application that has to parse and MODIFY some XHTML. The result of the operation has to be the modified XHTML. I started using SAX (xerces) and, though seemed to work, I found out that SAX does not keep my doctype (all parsed documents take the XHTML Stri

Re: [OT] A Sax response to Stax

2006-03-29 Thread Elliotte Harold
Joseph Kesselman wrote: Is SAX still it's own organization? Or has its maintainance been taken over by someone else by now (Apache, W3C, Oasis,?) It's still its own thing. -- Elliotte Rusty Harold [EMAIL PROTECTED] XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.o

Re: XML SAX well-formedness Error Reporting.

2005-11-23 Thread Elliotte Harold
[EMAIL PROTECTED] wrote: We also have SAXXMLValidator Class implementing ErrorHandler, which just prints error messages to Logs. The issue is, when the XML Document is malformed, errors are reported in the logs and the execution proceeds ahead. There is no Exception thrown out for any well-form

Re: xml-apis.jar with maven

2005-11-23 Thread Elliotte Harold
Michael Glavassevich wrote: Hi Magnus, This came up a couple months ago [1] and it looks like someone finally posted the jar [2] renaming it xml-apis-1.3.02.jar. That's going to confuse people. I suspect they were thinking that this is version 1.3.02 of JAXP; but it's also version 2.0.2 of

Re: Error parsing file

2005-11-20 Thread Elliotte Harold
Neil Aggarwal wrote: Hello: One of the web services I am integrating with is generating an XML response that contains this: 25544520050& Is there a way to override this behavior and force the parser to just take the input as text? No. Rejecting malformed data such as this example is one of t

Re: Question about SAX & Xerces

2005-10-17 Thread Elliotte Harold
Alan Ezust wrote: If SAXParserFactory is to be avoided, then why is it used by the JDK 1.5 API? In particular, I am wondering about this The programmers at Sun make the same mistakes everyone else does. Remember, they invented SAXParserFactory in the first place. Why it's throwing a ClassCa

Re: XML Element Names and 'XML'??

2005-10-08 Thread Elliotte Harold
Lauren Bish wrote: According to the XML spec, Element names are not allowed to start with "XML" (or any case variation thereof), yet when I call XML11Char.isXML11ValidName(String) with "xml" as an argument, the method returns true where I would have expected it to return false. I updated to 2.

Re: Question about SAX & Xerces

2005-08-08 Thread Elliotte Harold
Michael Glavassevich wrote: Out of curiosity, aside from the obviously bad default for namespace awareness what other pitfalls are there? That's certainly the biggest problem in practice. Beyond that, the SAXParser class has a lot of parser methods that depend on SAX1. The use of the Default

Re: Question about SAX & Xerces

2005-08-08 Thread Elliotte Harold
Michael Glavassevich wrote: That *could* all be done with XMLReader and XMLReaderFactory if standard features and properties were defined, but they're not. Perhaps JAXP 1.3 should have used features and properties but it didn't so the only implementation neutral way of enabling these things is

Re: Question about SAX & Xerces

2005-08-08 Thread Elliotte Harold
Michael Glavassevich wrote: Unless you want to enable XInclude processing, plug-in a schema validator or reliably reset the parser to the configuration it had when it was created. If you want to do these things, SAX2 alone isn't sufficient. That can all be done with XMLReader and XMLReaderFac

Re: How to use entities with XML Schema?

2005-05-19 Thread Elliotte Harold
Bob Foster wrote: Nope. If you have a DOCTYPE with either an internal or external DTD, Xerces validates against the DTD. Not necessarily true. You can tell Xerces to read the DTD but not validate or not to read the external DTD subset at all. I forget which mode is the default, but I don't thin