You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Albers, Michael" <mi...@lmco.com> on 2009/09/15 17:10:44 UTC
Modifying behavior of XercesParserLiaison
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
Posted by David Bertoni <db...@apache.org>.
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
RE: Modifying behavior of XercesParserLiaison
Posted by "Albers, Michael" <mi...@lmco.com>.
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@apache.org]
Sent: Tuesday, September 15, 2009 12:37 PM
To: xalan-c-users@xml.apache.org
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
Posted by David Bertoni <db...@apache.org>.
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