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 Colin Paul Adams <co...@colina.demon.co.uk> on 2003/02/02 14:16:31 UTC
Cannot read Xerces DOMNode
I am trying to use a Xerces DOMDocument as the input source to a
transform, but I'm getting the error:
Fatal Error at (file <unknown>, line 0, column 0):
An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id={null}
I created the XSLTInputSource thus:
XercesParserLiaison the_parser_liaison;
XalanDocument * document = the_parser_liaison.createDocument ( d->get_document () );
source = new XSLTInputSource ( static_cast<XalanNode *>( document ) );
I then pass *source as the first argument to XalanTransformer::transform
(both source and the_parser_liaison are actually private data members
of a separate class. A pointer to the object of this class is passed
as an argument to another function, which in turn calls transform).
I checked that source->getNode()->getNodeType() returns 9 immedialtely
prior to passing it to transform.
--
Colin Paul Adams
Preston Lancashire
Re: Cannot read Xerces DOMNode
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Hi Colin,
Take a look at this usage pattern:
http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource
Although this shows the old Xerces DOM, you can use with the new one if you
have the latest CVS code.
Dave
|---------+--------------------------->
| | Colin Paul Adams|
| | <colin@colina.de|
| | mon.co.uk> |
| | |
| | 02/02/2003 05:16|
| | AM |
|---------+--------------------------->
>--------------------------------------------------------------------------------------------------------------------------------|
| |
| To: xalan-c-users@xml.apache.org |
| cc: (bcc: David N Bertoni/Cambridge/IBM) |
| Subject: Cannot read Xerces DOMNode |
>--------------------------------------------------------------------------------------------------------------------------------|
I am trying to use a Xerces DOMDocument as the input source to a
transform, but I'm getting the error:
Fatal Error at (file <unknown>, line 0, column 0):
An exception occurred! Type:RuntimeException, Message:The primary document
entity could not be opened. Id={null}
I created the XSLTInputSource thus:
XercesParserLiaison the_parser_liaison;
XalanDocument * document = the_parser_liaison.createDocument (
d->get_document () );
source = new XSLTInputSource ( static_cast<XalanNode *>( document ) );
I then pass *source as the first argument to XalanTransformer::transform
(both source and the_parser_liaison are actually private data members
of a separate class. A pointer to the object of this class is passed
as an argument to another function, which in turn calls transform).
I checked that source->getNode()->getNodeType() returns 9 immedialtely
prior to passing it to transform.
--
Colin Paul Adams
Preston Lancashire