Project

Profile

Help

Configure Saxon with a SAX compatible parser

Added by Anonymous about 17 years ago

Legacy ID: #4518649 Legacy Poster: chinyi_woo (chinyi_woo)

Hello, I am trying to evaluate SAXON's performance on XQuery and need to configure it with another XML parser, for example xercs. I found that only the class net.sf.saxon.Transform provides such an option. net.sf.saxon.Query does not have one. I did search the internet and found little help on this. Does anyone has experience on this issue? Many thanks Chinyi


Replies (1)

RE: Configure Saxon with a SAX compatible par - Added by Anonymous about 17 years ago

Legacy ID: #4519152 Legacy Poster: Michael Kay (mhkay)

It's easy to nominate a different XML parser when you invoke Saxon via the Java API, for example you can call Configuration.setSourceParser(), or you can supply a SAXSource as input in which the XMLReader has been set by the application to the parser of your choice. There's no particular reason this option isn't offered in the XQuery command line. However, you shouldn't normally try to test Saxon performance by running from the command line. Your figures will be heavily distorted by the time taken to load the Java VM, which in turn depends heavily on what other applications are running on your machine at the time. It's best to write a Java application to do it, and ensure that it runs the query repeatedly for at least a couple of minutes; it's also best to ignore the first few executions whose performance tends to be very unpredictable from one run to the next. I don't think that you'll find that the choice of XML parser has a major effect on performance, unless you choose one that is unusually bad - but by all means measure it and tell me what you find out. Michael Kay http://www.saxonica.com/

    (1-1/1)

    Please register to reply