cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject RE: [C2][Xalan2] Transformation failure if SAX events generated programatically
Date Mon, 09 Oct 2000 21:35:03 GMT

Huh?  I thought this conversation was an issue with calling the stylesheet,
not stylesheet validity.  Sorry if I haven't followed the thread closely
enough.

The basic answer to backwards compatibility:
1) Conformance to the XSLT spec rules all, including error conditions.
2) It is unlikely that we'll keep element extensions backwards compatible,
unless someone wants to twist my arm.
3) Beyond this, we would like to keep stylesheets as backwards compatible
as possible.

-scott




                                                                                         
                         
                    Davanum                                                              
                         
                    Srinivas             To:     cocoon-dev@xml.apache.org, xalan-dev@xml.apache.org
              
                    <dims@yahoo.c        cc:     (bcc: Scott Boag/CAM/Lotus)          
                            
                    om>                  Subject:     RE: [C2][Xalan2] Transformation failure
if SAX events        
                                         generated programatically                       
                         
                    10/07/2000                                                           
                         
                    04:23 PM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    xalan-dev                                                            
                         
                                                                                         
                         
                                                                                         
                         




Scott,
I don't know whether you want to make Xalan2 backward-compatible with
exising XSL files or you
want us to change all the XSL files.

Thanks Sebastien. So we *MUST* revisit all the XSL files and make sure that
the tags are all right
to use Xalan2 as is.

Thanks,
dims

--- Sebastien Sahuc <ssahuc@imediation.com> wrote:
> > Sebastien,
> >
> > Let me clarify, Here's that i did.
> >
> > Step 1: Use StatusGenerator and serialize the output to FOO.XML.
>
> That where it hurts: you must set the namespaces feature to the reader,
so
> that the output elements remain exactly in the same namespace :
>
> reader.setFeature("http://xml.org/sax/features/namespaces", true);
>
> > Step 2: Use StatusGenerator and run a transform using FOO.XSL.
> > Step 3: Use FOO.XML from Step #1 and run a transform using FOO.XSL.
> >
> > The output from Step #2 and Step #3 Should be identical in my
> > opinion. That's what i meant.
> >
> > Now my question to you is Should we change StatusGenerator
> > code? Or should Xalan2 handle Step#2
> > and Step#3 in an identical fashion?????
>
> Once you set the namespaces feature, Xalan2 will handle both processing
in
> the same fashion. Unfortunately it does not work because of the
stylesheet
> not handling the default namespace.. :-(
>
> Sebastien
>
> >
> > Thanks,
> > dims
> >
> >
> > --- Sebastien Sahuc <ssahuc@imediation.com> wrote:
> > > dims wrote :
> > > > We have some code that generates SAX
> > > > events which need to be fed to the Transformer (instead of
> > > > reading from an XML file). This
> > > > produces invalid output. Enclosed is the code and sample
> > > > based on SAX2SAX.
> > >
> > > > Note that if you use
> > > > foo.xml which is exactly the XML generated by the code
> > > > programatically then you get valid output.
> > >
> > > Well not exactly the same. Indeed there are ONE BIG
> > difference in the way
> > > both method deal with namspaces :
> > > If you put a simple filter between the StatusGenerator and
> > the transfomer
> > > that trace the contentHandler's methods, you'll get :
> > >
> > >   startDocument
> > >   startPrefixMapping(, http://apache.org/cocoon/2.0/status)
> > >   startPrefixMapping(xlink, http://www.w3.org/1999/xlink)
> > >   startElement(http://apache.org/cocoon/2.0/status,
> > statusinfo, statusinfo
> > > ...
> > >   startElement(http://apache.org/cocoon/2.0/status, group, group ...
> > > [and so on ...]
> > >
> > > Whereas if you put the same filter between the XMLReader
> > (parser) and the
> > > transformer the trace change a little bit:
> > >
> > >   setDocumentLocator
> > >   startDocument
> > >   startElement(, statusinfo, statusinfo ...
> > >   startElement(, group, group ...
> > >
> > > So the output is not the same.. far away to be the same. I
> > would even say
> > > that they are completely different ! :-)
> > >
> > > Sebastien
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
> > http://photos.yahoo.com/
> >


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/





Mime
View raw message