Hi David,
I fear I'm confused by this answer.
I was using DOM input based on the example
"Working with DOM input and output" from the "Basic Usage Patterns"
with Xalan C++ 1.1 (NT 4.0) sucessfully.
After I've updated to 1.2 today, I'm getting the same error as Arnaud.
Has the DOM support been taken out of 1.2? Why?
Thanks,
Achim
[EMAIL PROTECTED] wrote:
>
> Hi Arnaud,
>
> We don't currently support DOM input for the transformer. We'll probably
> look at adding support for something like that in the future, but we just
> didn't have time to get all of the features in. It's also not clear that
> it's even possible to do, given the way the transfomer works.
>
> For the time being, you'll need to stick to the internal APIs to do this
> sort of thing, and unless you're actually modifying the DOM between the
> time you parse it and transform it, you should just let the transformer
> parse the file.
>
> Dave
>
>
> Arnaud Malguy
> <Arnaud.Malguy@x To: xalan-dev
><[EMAIL PROTECTED]>
> ps-pro.com> cc: (bcc: David N
>Bertoni/CAM/Lotus)
> Subject: XalanTransfomer with DOM
>input
> 08/22/2001 07:31
> AM
> Please respond
> to xalan-dev
>
>
>
> Hello,
>
> I use Xalan C++ 1.2 and i'm trying to implement a sequence of
> transformation with DOM intermediate result.
> For this, i need to use XalanDocument as input of
> XalanTransfomer::transform method.
> It seems to not work in my complete code then i create a basic sample which
> don't work too.
>
> I got the following error :
> Fatal Error at (file , line 0, column 0): An exception occured!
> Type:RuntimeException, Message:The primary document entity could not be
> opened. Id={null}
>
> Could someone help me to correct the following code ?
>
> XMLPlatformUtils::Initialize();
> XalanTransformer::initialize();
>
> XercesDOMSupport domSupport;
> XercesParserLiaison parserLiaison(domSupport);
> XalanTransformer xalanTransformer;
>
> XSLTInputSource input_source("test_in.xml");
> XSLTResultTarget output_result("test_out.xml");
> XSLTInputSource xslt_source("test.xslt");
>
> DOMParser theParser;
> // You MUST instruct the Xerces DOMParser NOT to create a DOM_XMLDecNode
> // in the DOM to represent the XML declaration. See
> "Limitations" below.
> theParser.setToCreateXMLDeclTypeNode(false);
> theParser.parse("test_in.xml");
> const DOM_Document theDOM = theParser.getDocument();
>
> XalanDocument* theDoc = parserLiaison.createDocument(theDOM);
>
> XSLTInputSource input_dom_source(theDoc);
>
> // WORK
> xalanTransformer.transform(input_source, xslt_source, output_result);
>
> // Don't WORK
> xalanTransformer.transform(input_dom_source, xslt_source,
> output_result);
>
> XalanTransformer::terminate();
> XMLPlatformUtils::Terminate();
>
> Thanks a lot.
>
> Arnaud Malguy