Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 4627 invoked from network); 19 Jan 2001 02:05:19 -0000 Received: from unknown (HELO msx03.solidworks.com) (206.34.34.4) by h31.sny.collab.net with SMTP; 19 Jan 2001 02:05:19 -0000 Received: by msx03 with Internet Mail Service (5.5.2653.19) id ; Thu, 18 Jan 2001 20:45:11 -0500 Message-ID: <8FC1AD487EDED311B3AF00D0B72CEB197DF9C2@MSX02> From: Seetharam Misro To: "'general@xml.apache.org'" Subject: RE: Failed to process style sheet Date: Thu, 18 Jan 2001 21:05:00 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N As pointed out by David, I have experimented on Xalan-Java version. You are using C++ version. But it seems we both have the same problem: I suspect that its not the problem with Style sheet but making an XSLInputSource from DOM. Just wondering if you could make this work: pass an XML DOM and an XSL source as XSLInputSources. ( not ::process(DOM, DOM) but process(DOM,src) ). One more pointer : Newer version of XalanJ2 has in its samples a DOM2DOM example. (It is as if this was not supported in the earlier version). But this uses transform() and not process(). The whole design has been changed. And I could not get that working on Netscape either. Whatever I was able to do using the earlier version of Xalan was not possible with version 2. So even I'm stuck up.. -seetharam -----Original Message----- From: Lyle Coder [mailto:x_coder@hotmail.com] Sent: Wednesday, January 03, 2001 12:16 PM To: general@xml.apache.org; David_N_Bertoni@lotus.com Subject: Re: Failed to process style sheet Here is how the code looks: XSLTInputSource *theInputSource = new XSLTInputSource(xml_dom); XSLTInputSource *theStyleSheet = new XSLTInputSource(xsl_dom); const XalanDOMString theOutputFileName("foo.out"); XSLTResultTarget theResult(theOutputFileName); cerr << "pass 1" << endl; StylesheetConstructionContextDefault theConstructionContext( theProcessor, theXSLTProcessorEnvSupport, theXPathFactory); cerr << "pass 2" << endl; StylesheetExecutionContextDefault theExecutionContext( theProcessor, theXSLTProcessorEnvSupport, theXPathSupport, theXObjectFactory); cerr << "pass 3" << endl; StylesheetRoot *theStylesheetRoot = theProcessor.processStylesheet( *theStyleSheet, theConstructionContext); cerr << "pass 4" << endl; XSLTInputSource *theFinalStylesheet = new XSLTInputSource( (XalanNode *)theStylesheetRoot); cerr << "pass 5" << endl; theProcessor.process(*theInputSource, *theFinalStylesheet, theResult, theConstructionContext, theExecutionContext); I make it up to pass 3 before I get the following error: server: XSLT/Stylesheet.cpp:318: void Stylesheet::popNamespaces(): Assertion `m_namespaces.empty() == false' failed Thanks Lyle ----- Original Message ----- From: "Lyle Coder" To: ; Sent: Wednesday, January 03, 2001 9:02 AM Subject: Re: Failed to process style sheet > Hi, > I got much further now after David's suggestion about processStylesheet... I > must say the API is not that well explained in the docs :( > > Now I get another exception: > > server: XSLT/Stylesheet.cpp:318: void Stylesheet::popNamespaces(): Assertion > `m_namespaces.empty() == false' failed. > > Any clues on what may be causing this?? > > Thanks for all the help! > Lyle > > ----- Original Message ----- > From: "Seetharam Misro" > To: > Sent: Thursday, January 18, 2001 5:29 PM > Subject: RE: Failed to process style sheet > > > > When this discussion is on I would like to ask again a question > > related to this which I did not get a reply earlier: > > ___________ > > I'm using Xalan J1.2.2 and as an applet in Netscape4.7. > > > > I could transform XML(source file) to DOM . But after I make changes > > to this DOM object,say by appending childNodes, how do I re-transform to > > DOM? > > I tried by instantiating XSLTInputSource with the root-XalanNode and > passing > > it to the > > process() API. But it gave an error in > > XSLTEngineImpl::getSourceTreeFromInput(inputSrc) . > > > > Any suggestions? > > > > -seetharam > > > > -----Original Message----- > > From: David_N_Bertoni@lotus.com [mailto:David_N_Bertoni@lotus.com] > > Sent: Thursday, January 18, 2001 8:17 PM > > To: general@xml.apache.org > > Subject: RE: Failed to process style sheet > > > > > > > > Except that he's using Xalan C++, and you're talking about Xalan J. > > > > But that brings up an interesting question. How are you using expat to do > > this? You'd either have to build a Xerces DOM and wrap it, or wrap > Clark's > > DOM. Either way, this is incredibly inefficient. > > > > Why don't you just let Xalan use the Xerces parser to build the > appropriate > > trees? That way, the transform will be the most optimal. Sharing DOM > > trees in C++ is next to impossible without lots of wrapper overhead. > > > > Dave > > > > > > > > > > > > Seetharam > > > > Misro To: > "'general@xml.apache.org'" > > > > > Bertoni/CAM/Lotus) > > works.com> Subject: RE: Failed to > process > > style sheet > > > > > > 01/18/2001 > > > > 07:55 PM > > > > Please > > > > respond to > > > > general > > > > > > > > > > > > > > > > > > Few things first: > > 1. You must be using Xalan 1_2_2 . > > 2. I'm not sure if you can use the DOM object returned by expat > > and pass it to Xalan.What about the DOM representation in both ..are > > they > > compatible? > > 3. There is an example in the Samples directory which shows how to use > > Xalan to input a source XML file and get a DOM object. You could use > > this. > > > > -seetharam > > > > -----Original Message----- > > From: Lyle Coder [mailto:x_coder@hotmail.com] > > Sent: Wednesday, January 03, 2001 11:08 AM > > To: general@xml.apache.org > > Subject: Re: Failed to process style sheet > > Importance: High > > > > > > Hi, > > Yes, I have my own code (written to the Xalan API). I made it look > exactly > > like the SimpleTransform example in the Xalan package. > > > > Except, instead of using a file name as the XSLTInputSource, I am > > instantiating XSLTImputSource with a XalanNode object. I create this > > object > > by parsing the XML and XSL files using James Clarks expat. > > > > That was all there is to the input message, any pointers on seeing where > > things are failing? It says failed to process stylesheet, could that mean > > that my DOM is constructed wrong? It seems ok to me... > > > > Thanks > > Lyle > > > > ----- Original Message ----- > > From: > > To: > > Sent: Thursday, January 18, 2001 4:34 PM > > Subject: Re: Failed to process style sheet > > > > > > > > > > I assume you're writing your own code and not using the testXSLT sample? > > > If so, is that all there is to the error message, or is there more? > > > > > > You might also try debugging your code to see where the exception is > > being > > > thrown. > > > > > > Dave > > > > > > > > > > > > > > > "Lyle Coder" > > > > > > ail.com> cc: (bcc: David N > > Bertoni/CAM/Lotus) > > > Subject: Failed to process > > style sheet > > > 01/03/2001 > > > 10:45 AM > > > Please > > > respond to > > > general > > > > > > > > > > > > > > > > > > Hi, > > > I am calling XSLTEngineImpl::process() on an XSLTInputSource class I > > > created from a XalanDom object. I get an exception "Failed to process > > > stylesheet!". How do I tell what is going wrong? > > > > > > Thanks > > > Lyle > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > In case of troubles, e-mail: webmaster@xml.apache.org > > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > > For additional commands, e-mail: general-help@xml.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > For additional commands, e-mail: general-help@xml.apache.org > > > > --------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > For additional commands, e-mail: general-help@xml.apache.org > > > > > > > > > > > > > > --------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > For additional commands, e-mail: general-help@xml.apache.org > > > > --------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > For additional commands, e-mail: general-help@xml.apache.org > > > > > > --------------------------------------------------------------------- > In case of troubles, e-mail: webmaster@xml.apache.org > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > For additional commands, e-mail: general-help@xml.apache.org > > --------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org