Hi
I am quite new to Xalan and XSLT and Im having a few problems trying to transform an XML message using a simple XSLT file.
I have a char* inputMessage that contains the xml to be transformed. I am using an isstrstream to populate the XSLTInputSource. I am also using the compileStylesheet method, which is returning without error. I get the following error when I try the transformation:
Fatal Error.Occurred at unknown file , line 1 , column 2. Expected an element name
Ive tried stripping down the input msg to just a couple of tags, but still get the same error msg.
Any help or pointers would be much appreciated.
Cheers
Chris
XALAN_USING_XERCES(XMLPlatformUtils)
XALAN_USING_XALAN(XalanTransformer)
XALAN_USING_XALAN(XSLTInputSource)
XALAN_USING_XALAN(XSLTResultTarget)
XALAN_USING_XALAN(XalanCompiledStylesheet)
XMLPlatformUtils::Initialize();
XalanTransformer::initialize();
XalanTransformer theXalanTransformer;
istrstream str(inputMessage, strlen(inputMessage));
XSLTInputSource msgToTransform(&str);
XSLTResultTarget xmlOut(cout);
const char* pTheXSLFileName = "/vobs/tr/tr/exe/test.xsl";
const XalanCompiledStylesheet* pCompiledStylesheet = 0;
theResult = theXalanTransformer.compileStylesheet( pTheXSLFileName,
pCompiledStylesheet );
if(theResult == 0)
{
theResult = theXalanTransformer.transform( msgToTransform,
pCompiledStylesheet,
xmlOut );
- Problems with XSLTInputSource christopher . j . downey
- Re: Problems with XSLTInputSource David Bertoni
- Re: Problems with XSLTInputSource christopher . j . downey
- Re: Problems with XSLTInputSource David Bertoni
