Modifying behavior of XercesParserLiaison

View: New views
4 Messages — Rating Filter:   Alert me  

Modifying behavior of XercesParserLiaison

by Albers, Michael :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
 
I've been trying to use the XercesParserLiaison::setExternalSchemaLocation function call and have found that it has no effect. Looking at the source code for XercesParserLiaison it appears that none of the behavior modification get/set functions actually have any effect because the XercesParserLiaison::ensureDOMParser call is never made and can't be called by the user. Will this be changed in a future release of Xalan? In the meantime, is there any way to work around this? It isn't critical for me at this point but the XercesParserLiaison API is very misleading.
 
Michael Albers

Re: Modifying behavior of XercesParserLiaison

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Albers, Michael wrote:

> Hello,
>  
> I've been trying to use the
> XercesParserLiaison::setExternalSchemaLocation function call and have
> found that it has no effect. Looking at the source code for
> XercesParserLiaison it appears that none of the behavior modification
> get/set functions actually have any effect because the
> XercesParserLiaison::ensureDOMParser call is never made and can't be
> called by the user. Will this be changed in a future release of Xalan?
> In the meantime, is there any way to work around this? It isn't critical
> for me at this point but the XercesParserLiaison API is very misleading.
XercesParserLiaison::ensureDOMParser() is called by
XercesParserLiaison::parseXMLStream(const InputSource& inputSource,
        const XalanDOMString& identifier), from what I can tell.  Are
you perhaps calling the version the overload that accepts a DocumentHandler?

Since the SAXParser doesn't support schema processing, there's no reason
to use those properties for that call. I will tighten up the
documentation for the property calls to clarify the situation.

Dave

RE: Modifying behavior of XercesParserLiaison

by Albers, Michael :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dave,

I'm using the 2 parameter version of parseXMLStream, though I'm not providing the 2nd parameter, just using the default value. Regardless, in the Xalan code I have (v1.10), ensureDOMParser is not called, but rather createDOMParser is.

Michael Albers

-----Original Message-----
From: David Bertoni [mailto:dbertoni@...]
Sent: Tuesday, September 15, 2009 12:37 PM
To: xalan-c-users@...
Subject: Re: Modifying behavior of XercesParserLiaison

Albers, Michael wrote:

> Hello,
>  
> I've been trying to use the
> XercesParserLiaison::setExternalSchemaLocation function call and have
> found that it has no effect. Looking at the source code for
> XercesParserLiaison it appears that none of the behavior modification
> get/set functions actually have any effect because the
> XercesParserLiaison::ensureDOMParser call is never made and can't be
> called by the user. Will this be changed in a future release of Xalan?
> In the meantime, is there any way to work around this? It isn't
> critical for me at this point but the XercesParserLiaison API is very misleading.
XercesParserLiaison::ensureDOMParser() is called by XercesParserLiaison::parseXMLStream(const InputSource& inputSource,
        const XalanDOMString& identifier), from what I can tell.  Are you perhaps calling the version the overload that accepts a DocumentHandler?

Since the SAXParser doesn't support schema processing, there's no reason to use those properties for that call. I will tighten up the documentation for the property calls to clarify the situation.

Dave

Re: Modifying behavior of XercesParserLiaison

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Albers, Michael wrote:
> Dave,
>
> I'm using the 2 parameter version of parseXMLStream, though I'm not providing the 2nd parameter, just using the default value. Regardless, in the Xalan code I have (v1.10), ensureDOMParser is not called, but rather createDOMParser is.
Ah, I was referring to the latest source code, so this is indeed a bug
that's been fixed. You can either upgrade, or merge the changes into
your version of the source.

Dave