cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <>
Subject [XalanJ2][C2] javax.xml.transform interfaces - 2 Problems.
Date Mon, 06 Nov 2000 15:40:55 GMT

There are two problems.

Problem #1:
There is a problem with the attached sample (simple.xsp and xsp.xsl). It works well with the
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

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

Problem #2: Need to check for Null's in, 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()));


--- 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

Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
View raw message