You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Dylan Parker <dy...@mindstech.com> on 2000/09/15 20:34:06 UTC

createDocument() not supported in XMLParserLiaisonDefault

Hello, developers.

I hope I am not out of line posting here. I accessed what I could of the
archives through google's cached pages (archives are down... often) and this
seems like a reasonable place to post.

I am using Orion Application Server (http://www.orionserver.com) which makes use
of Xerces and Xalan to do XML/XSL parsing and transforming.

I am receiving an error when trying to use xsl:param within a xsl:template that
is called with xsl:call-template.

This works :
<xsl:template name="form-text">
        <INPUT type="text" value="{@value}" maxlength="{@maxlength}" name="{@name}" size="50" />
</xsl:template>


and this gives an error :
<xsl:template name="form-text">
        <xsl:param name="size">50</xsl:param>
        <INPUT type="text" value="{@value}" maxlength="{@maxlength}" name="{@name}" size="50" />
</xsl:template>

The error in the browser is :
Internal XSL-parser error: java.lang.RuntimeException (createDocument() not supported in XMLParserLiaisonDefault!)

And sure enough in the API spec XMLParserLiaisonDefault doesn't support
createDocument.. it is throwing that exception.

My question is why might this function be getting called? And is this something
that is potentially wrong with the Xalan code or with Orion code?

Find the orion exception stack trace at the bottom of this email for a more
detailed error report.

I _have_ notified Orion about it, but wanted to do some more homework... and I
haven't received a response yet.

Any help or pointers is greatly appreciated.

Thanks,
Dylan Parker.
[STACK TRACE BELOW]
java.lang.RuntimeException: createDocument() not supported in XMLParserLiaisonDefault!
        at org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.createDocument(XMLParserLiaisonDefault.java:1014)
        at org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getDOMFactory(XMLParserLiaisonDefault.java:1458)
        at org.apache.xalan.xslt.XSLTEngineImpl.getDOMFactory(XSLTEngineImpl.java:3277)
        at org.apache.xalan.xslt.XSLTEngineImpl.createDocFrag(XSLTEngineImpl.java:2991)
        at org.apache.xalan.xslt.XSLTEngineImpl.createResultTreeFrag(XSLTEngineImpl.java:2127)
        at org.apache.xalan.xslt.ElemVariable.getValue(ElemVariable.java:180)
        at org.apache.xalan.xslt.ElemVariable.execute(ElemVariable.java:146)
        at org.apache.xalan.xslt.ElemParam.execute(ElemParam.java:110)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:140)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:140)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java, Compiled Code)
        at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java, Compiled Code)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java, Compiled Code)
        at com.evermind.servlet.XSLServlet.service(JAX)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at com.evermind.server.http.d5.rx(JAX, Compiled Code)
        at com.evermind.server.http.d5.rw(JAX, Compiled Code)
        at com.evermind.util.f.run(JAX, Compiled Code)
[END STACK TRACE]



Un-exceptions (XalanC)

Posted by David Braaten <da...@multiactive.com>.
I'm just trying out the latest sources from CVS, and came across something
that caught my attention. (Because nothing catches your
attention like an uncaught exception... ;) )

PlatformSupport/URISupport.cpp has a strange bit of code:

URISupport::URLAutoPtrType
URISupport::getURLFromString(const XalanDOMString& urlString)
{
 URLAutoPtrType url(new XMLURL);

 try
 {
  url->setURL(c_wstr(getURLStringFromString(urlString)));
 }
 catch (...)
 {
  throw ("Error! Cannot create url for: " + urlString);
 }
 return url;
}

As far as I can tell, url->setURL(c_wstr(getURLStringFromString(urlString)))
will throw an that actually means something.
This try+catch in URISupport translates a useful error into something
that isn't.

So, unless there is some other reason to do the catch like that, I suggest
getting rid of the try+catch in that method.

URISupport::URLAutoPtrType
URISupport::getURLFromString(const XalanDOMString& urlString)
{
 URLAutoPtrType url(new XMLURL);

 url->setURL(c_wstr(getURLStringFromString(urlString)));

 return url;
}


After doing this, I get a much more informative message:

SAXException Message is : An exception occured! Type:MalformedURLException,
Message:No protocol prefix present

----

PS, Thanks David and Stephen for your explanations of where ICU fits in to
Xalan, they clarified my understanding greatly.





Re[2]: createDocument() not supported in XMLParserLiaisonDefault

Posted by Dylan Parker <dy...@mindstech.com>.
> Dylan --

> Sorry but I don't know anything about Orion.  However, the problem seems
> to be that you are getting XMLParserLiaisonDefault as your XML parser
> liaison.  This class should probably not be used directly but a subclass
> should be used that implements the createDocument() method that you
> need.

> The place to look for the problem is in
> com.evermind.servlet.XSLServlet.service().  This is the routine calling
> XSLTEngineImpl.process().  XSLTEngineImpl.process() takes a single
> argument and that is the XML parser liaison.  Try to find out what
> XSLServlet.service() is supplying to XSLTEngineImpl.process() for this
> value and I think you'll have located the problem.

> HTH,
> Gary


Gary,

Excellent, thank you. I looked into it and someone else had written an
alternative to the XSLServlet servlet for use with Orion. I have forwarded
details from your above message to Orion in hopes that they fix their own
servlet as well.

Thanks, again

Dylan Parker



Re: createDocument() not supported in XMLParserLiaisonDefault

Posted by Gary L Peskin <ga...@firstech.com>.
Dylan Parker wrote:
> java.lang.RuntimeException: createDocument() not supported in XMLParserLiaisonDefault!
>         at org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.createDocument(XMLParserLiaisonDefault.java:1014)
>         at org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getDOMFactory(XMLParserLiaisonDefault.java:1458)
>         at org.apache.xalan.xslt.XSLTEngineImpl.getDOMFactory(XSLTEngineImpl.java:3277)
>         at org.apache.xalan.xslt.XSLTEngineImpl.createDocFrag(XSLTEngineImpl.java:2991)
>         at org.apache.xalan.xslt.XSLTEngineImpl.createResultTreeFrag(XSLTEngineImpl.java:2127)
> [lots deleted]
>         at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
>         at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java, Compiled Code)
>         at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java, Compiled Code)
>         at com.evermind.servlet.XSLServlet.service(JAX)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>         at com.evermind.server.http.d5.rx(JAX, Compiled Code)
>         at com.evermind.server.http.d5.rw(JAX, Compiled Code)
>         at com.evermind.util.f.run(JAX, Compiled Code)
> [END STACK TRACE]

Dylan --

Sorry but I don't know anything about Orion.  However, the problem seems
to be that you are getting XMLParserLiaisonDefault as your XML parser
liaison.  This class should probably not be used directly but a subclass
should be used that implements the createDocument() method that you
need.

The place to look for the problem is in
com.evermind.servlet.XSLServlet.service().  This is the routine calling
XSLTEngineImpl.process().  XSLTEngineImpl.process() takes a single
argument and that is the XML parser liaison.  Try to find out what
XSLServlet.service() is supplying to XSLTEngineImpl.process() for this
value and I think you'll have located the problem.

HTH,
Gary