The only problem with setSourceParserClass is that its scope may be too wide, especially if you want to use a specialized parser such as TagSoup for parsing HTML.
 
In XQJ you have
 
public void bindDocument(QName varname, Source value, XQItemType type)
 
which allows you to supply any kind of Souce, including a SAXSource; you can initialize a SAXSource with the XMLReader (=parser) that you want to use for that specific document.
 
Michael Kay
http://www.saxonica.com/


From: Copeland, Paul [mailto:pcopeland@ebay.com]
Sent: 15 December 2008 22:57
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Selecting parser for xquery via xqj

What is the right way to choose a parser for xquery using xqj?
 
The javadoc for net.sf.saxonica.Configuration somewhat discourages the use of method setSourceParserClass.
 
I am planning to use Configuration.setURIResolver(...) and XQDynamicContext.bindDocument(...)
 
Those seem to be ways to control what type of parser is used.  Is there another way (property, etc.)?
 
Thanks - Paul Copeland