xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyle Coder" <x_co...@hotmail.com>
Subject Re: Failed to process style sheet
Date Wed, 03 Jan 2001 17:15:45 GMT
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" <x_coder@hotmail.com>
To: <general@xml.apache.org>; <David_N_Bertoni@lotus.com>
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" <smisro@solidworks.com>
> To: <general@xml.apache.org>
> 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'"
> > <general@xml.apache.org>
> >                     <smisro@solid        cc:     (bcc: David N
> > 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: <David_N_Bertoni@lotus.com>
> > To: <general@xml.apache.org>
> > 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"
> > >                     <x_coder@hotm        To:
> <general@xml.apache.org>
> > >                     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
>
>

Mime
View raw message