Link to home
Start Free TrialLog in
Avatar of amiry
amiry

asked on

Xalan C++ problem

hi ,
i am using Xalan(C++) on windows (VS6.0 sp5.0 )
i am trying use an XSL transformer of type

XalanTransformer in a very straight forward way:

#include <Include/PlatformDefinitions.hpp>
#include <util/PlatformUtils.hpp>
#include <XalanTransformer/XalanTransformer.hpp>

void main()
{
     XMLPlatformUtils::Initialize();
     XalanTransformer::initialize();

     

     XalanTransformer theXalanTransformer;


     XSLTInputSource xmlIn("C:\\Xmls\\foo.xml");
     XSLTInputSource xslIn("C:\\Xmls\\foo.xsl");
     XSLTResultTarget xmlOut("C:\\Xmls\\out.xml");

     int theResult =
     theXalanTransformer.transform(xmlIn,xslIn,xmlOut);
     
}
i get an unhandled exception(access violation) in the last line. i am using xerces  with the compatible version to xalan .
the files foo.xml , foo.xsl are in the specified path.
what could be the problem ?

thanks a lot,
amir
Avatar of zvonko
zvonko

I assume the problem is in the URI strings.

Try first relative file names without drive letter and directory. Of course should all resources be in the same directory then.

If this works, then try changing the slashes to single forward slashes without the dive letter.

Finally you can try giving such URI's:
"file:///c:/Xmls/foo.xml"

Good luck,
zvonko

Avatar of amiry

ASKER

it is not the problem of URI strings.
So what does XalanTransformer::getLastError() report?

 
Avatar of amiry

ASKER

it just crushes.... and there is no error code.. (it says
0 ) . do u know which STL version  Xalan is built with ?
ASKER CERTIFIED SOLUTION
Avatar of zvonko
zvonko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial