cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Re: [XalanJ2][C2] javax.xml.transform interfaces - 2 Problems.
Date Mon, 06 Nov 2000 21:01:13 GMT

Davanum, sorry about that.  This (the first problem) occured during the
optimization I was doing the last several weeks.  The problem was that the
variable resolution is done at a very late stage, long after the context
for the next stack frame is pushed.  It's fixed by saving the positions in
the variable stack at the time of initial execution of the
LocationIterator, and setting back to those positions for each invocation
of nextNode().

Give it another try...

-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:     [XalanJ2][C2] javax.xml.transform
interfaces - 2 Problems.   
                                                                                         
                         
                    11/06/00                                                             
                         
                    10:40 AM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    cocoon-dev                                                           
                         
                                                                                         
                         
                                                                                         
                         




Scott,

There are two problems.

Problem #1:
There is a problem with the attached sample (simple.xsp and xsp.xsl). It
works well with the old
jar and has problems with the new changes when i run using the following
command-line.

"java org.apache.xalan.xslt.Process -IN simple.xsp -XSL xsp.xsl"

The problem is that the following template does not work. which drastically
reduces the output
XML.

...
...
        <!-- Process only 1st non-XSP element as generated root -->
        <xsl:call-template name="process-first-element">
          <xsl:with-param
                          name="content"
                          select="*[not(starts-with(name(.), 'xsp:'))]"/>
        </xsl:call-template>
...
...
  <xsl:template name="process-first-element">
    <xsl:param name="content"/>
    <xsl:apply-templates select="$content[1]"/>
  </xsl:template>
...
...

Problem #2: Need to check for Null's in Expression.java, Function warn().

  public void warn(XPathContext xctxt, int msg, Object[] args)
          throws org.xml.sax.SAXException
  {
    java.lang.String fmsg = XSLMessages.createXPATHWarning(msg, args);
    if(xctxt!=null && xctxt.getPrimaryReader()!=null)
    {
        ErrorHandler eh = xctxt.getPrimaryReader().getErrorHandler();
        if (null != eh)
        {
          // TO DO: Need to get stylesheet Locator from here.
          eh.warning(new SAXParseException(fmsg,
(SAXSourceLocator)xctxt.getSAXLocator()));
        }
    }
  }

Thanks,
dims

--- Scott_Boag@lotus.com wrote:
> I have completed the first cut at the XalanJ2 transition to the (now
> called) javax.xml.transform (but I'll still refer to it as TrAX)
> interfaces.  I'm doing a clean download and build now to make sure
> everything is kosher, but I think it's in pretty OK shape.
>
> I apologize for my inattention to the list this week, including the
XalanJ1
> problems.  The TrAX combination of changes of derivation of the
exceptions
> and locators, and the changes to ths SAX-level mechanisms hit harder than
I
> anticipated, and I urgently had to get this done.  The codebase is
> currently a little rough for the wear.  I'll do some cleanup over the
> course of the next couple of weeks.  A giant huge thanks to all, and esp.
> Gary Peskin, for their coverage.  The xalan-dev list is really getting
that
> community feeling, and that's a great experience for all of us who have
> been working on LotusXSL/Xalan since the days of AlphaWorks.
>
> There were changes in the TrAX interfaces from what I posted a few days
> ago:
>
> 1) Some additional classes in the sax subdirectory, and methods.  I don't
> think there should be anything controversial.
> 2) Mechanisms in the DOMSource class to be able to set the baseID.
> 3) A getBaseID on the Source class, which I'm not sure we should keep,
but
> it needs to be discussed on the list.
> 4) TFactoryConfigurationError and TransformerConfigurationException has
> replaced TransformerFactoryException, in order to more closely align with
> javax.xml.parser stuff.  TransformerException is needed and remains.
> 5) An OutputKeys class has been created in the stream directory to
provide
> a place for constant keys for controling serialization properties.
>
> There will probably be more minor changes to these interfaces, but
> hopefully, the major changes are over with.
>
> I have only smoke tested with the example files.  I'll be doing a lot of
> testing and polishing over the next few days.
>
> Cocoon folks, you may want to wait a day or two for things to settle down
a
> bit.  It's up to you.
>
> The place to start with this is the examples files, inside the
> xml-xalan\java\samples\trax directory.
>
> I'll be out of touch over the weekend, but back on line on Monday.
>
> -scott
>
>
>
> .
> ekend, but back on line on Monday.
>
> -scott
>
>
>
> .
>


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/(See attached file: xsp.zip)


Mime
View raw message