From lindsey32@example.net Thu Mar 1 19:01:17 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 50879 invoked by uid 1034); 1 Mar 2001 19:01:17 -0000 Date: 1 Mar 2001 19:01:17 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/c/src/XPath XObjectFactoryDefault.cpp XObjectFactoryDefault.hpp dbertoni 01/03/01 11:01:16 Modified: c/src/XPath XObjectFactoryDefault.cpp XObjectFactoryDefault.hpp Log: Use vector instead of set for holding instances. Revision Changes Path 1.22 +8 -4 xml-xalan/c/src/XPath/XObjectFactoryDefault.cpp Index: XObjectFactoryDefault.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectFactoryDefault.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- XObjectFactoryDefault.cpp 2001/02/27 16:49:41 1.21 +++ XObjectFactoryDefault.cpp 2001/03/01 19:01:14 1.22 @@ -269,9 +269,13 @@ default: { - const CollectionTyp888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4iterator i = - m_xobjects.find(theXObject); +#if !defined(XALAN_NO_NAMESPACES) + using st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4find; +#endif + const XObjectCollectionTyp888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4iterator i = + find(m_xobjects.begin(), m_xobjects.end(), theXObject); + if (i != m_xobjects.end()) { if (fInReset == false) @@ -321,7 +325,7 @@ { XUnknown* const theXUnknown = new XUnknown(theValue); - m_xobjects.insert(theXUnknown); + m_xobjects.push_back(theXUnknown); theXUnknown->setFactory(this); @@ -335,7 +339,7 @@ { XSpan* const theXObject = new XSpan(theValue); - m_xobjects.insert(theXObject); + m_xobjects.push_back(theXObject); theXObject->setFactory(this); 1.21 +7 -7 xml-xalan/c/src/XPath/XObjectFactoryDefault.hpp Index: XObjectFactoryDefault.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectFactoryDefault.hpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- XObjectFactoryDefault.hpp 2001/02/27 16:49:41 1.20 +++ XObjectFactoryDefault.hpp 2001/03/01 19:01:15 1.21 @@ -192,13 +192,13 @@ createSpan(BorrowReturnMutableNodeRefList& theValue); #if defined(XALAN_NO_NAMESPACES) - typedef set<XObject*, less<XObject*> > CollectionType; - typedef vector<XNumber*> XNumberCacheType; - typedef vector<XNodeSet*> XNodeSetCacheType; + typedef vector<XObject*> XObjectCollectionType; + typedef vector<XNumber*> XNumberCacheType; + typedef vector<XNodeSet*> XNodeSetCacheType; #else - typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4set<XObject*> CollectionType; - typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XNumber*> XNumberCacheType; - typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XNodeSet*> XNodeSetCacheType; + typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XObject*> XObjectCollectionType; + typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XNumber*> XNumberCacheType; + typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XNodeSet*> XNodeSetCacheType; #endif protected: @@ -242,7 +242,7 @@ XTokenStringAdapterAllocator m_xtokenStringAdapterAllocator; - CollectionType m_xobjects; + XObjectCollectionType m_xobjects; XNumberCacheType m_xnumberCache; From lindsey32@example.net Thu Mar 1 19:14:01 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 60709 invoked by uid 1160); 1 Mar 2001 19:14:01 -0000 Date: 1 Mar 2001 19:14:01 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/c/src/XSLT ElemPI.cpp ElemPI.hpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp XSLTEngineImpl.cpp XSLTEngineImpl.hpp XSLTProcessor.hpp auriemma 01/03/01 11:14:00 Modified: c/src/XSLT ElemPI.cpp ElemPI.hpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp XSLTEngineImpl.cpp XSLTEngineImpl.hpp XSLTProcessor.hpp Log: Removed evaluateAttrVal. Revision Changes Path 1.8 +9 -9 xml-xalan/c/src/XSLT/ElemPI.cpp Index: ElemPI.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemPI.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ElemPI.cpp 2001/02/12 02:34:53 1.7 +++ ElemPI.cpp 2001/03/01 19:13:44 1.8 @@ -65,7 +65,7 @@ #include <PlatformSupport/DOMStringHelper.hpp> - +#include "AVT.hpp" #include "Constants.hpp" #include "StylesheetConstructionContext.hpp" #include "StylesheetExecutionContext.hpp" @@ -83,7 +83,7 @@ lineNumber, columnNumber, Constants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4LEMNAME_PI), - m_name_atv() + m_nameAVT(0) { const unsigned int nAttrs = atts.getLength(); @@ -92,8 +92,9 @@ const XalanDOMChar* const aname = atts.getName(i); if(equals(aname, Constants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TTRNAME_NAME)) - { - m_name_atv = atts.getValue(i); + { + m_nameAVT = new AVT(aname, atts.getType(i), atts.getValue(i), + *this, constructionContext); } else if(isAttrOK(aname, atts, i, constructionContext) == false || processSpaceAttr(aname, atts, i)) { @@ -101,7 +102,7 @@ } } - if(isEmpty(m_name_atv) == true) + if(0 == m_nameAVT) { constructionContext.error(Constants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4LEMNAME_PI_WITH_PREFIX_STRING + " must have a name attribute."); } @@ -131,11 +132,10 @@ const QName& mode) const { ElemTemplateElement888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4xecute(executionContext, sourceTree, sourceNode, mode); + + XalanDOMString piName; - const XalanDOMString piName = - executionContext.evaluateAttrVal(sourceNode, - *this, - m_name_atv); + m_nameAVT->evaluate(piName, sourceNode, *this, executionContext); if(equalsIgnoreCase(piName, XALAN_STATIC_UCODE_STRING("xml"))) { 1.8 +5 -1 xml-xalan/c/src/XSLT/ElemPI.hpp Index: ElemPI.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemPI.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ElemPI.hpp 2001/02/12 02:34:53 1.7 +++ ElemPI.hpp 2001/03/01 19:13:46 1.8 @@ -69,6 +69,10 @@ +class AVT; + + + class ElemPI: public ElemTemplateElement { public: @@ -112,7 +116,7 @@ private: - XalanDOMString m_name_atv; + const AVT* m_nameAVT; }; 1.47 +0 -14 xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp Index: StylesheetExecutionContext.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- StylesheetExecutionContext.hpp 2001/01/26 22:03:10 1.46 +++ StylesheetExecutionContext.hpp 2001/03/01 19:13:47 1.47 @@ -475,20 +475,6 @@ const XPath* m_xpath; }; - /** - * Evaluate the value of an attribute within the context of a specified - * context node and namespace - * - * @param contextNode current context node - * @param namespaceContext context for namespace resolution - * @param stringedValue value to evaluate - */ - virtual const XalanDOMString - evaluateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue) = 0; - #if defined(XALAN_NO_NAMESPACES) typedef vector<TopLevelArg> ParamVectorType; #else 1.55 +0 -14 xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp Index: StylesheetExecutionContextDefault.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- StylesheetExecutionContextDefault.cpp 2001/01/31 01:42:20 1.54 +++ StylesheetExecutionContextDefault.cpp 2001/03/01 19:13:48 1.55 @@ -440,20 +440,6 @@ -const XalanDOMString -StylesheetExecutionContextDefault888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4valuateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue) -{ - return m_xsltProcessor.evaluateAttrVal(contextNode, - namespaceContext, - stringedValue, - *this); -} - - - void StylesheetExecutionContextDefault888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4pushTopLevelVariables(const ParamVectorType& topLevelParams) { 1.49 +0 -6 xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp Index: StylesheetExecutionContextDefault.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- StylesheetExecutionContextDefault.hpp 2001/01/31 01:42:20 1.48 +++ StylesheetExecutionContextDefault.hpp 2001/03/01 19:13:49 1.49 @@ -303,12 +303,6 @@ virtual void returnXPath(const XPath* xpath); - virtual const XalanDOMString - evaluateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue); - virtual void pushTopLevelVariables(const ParamVectorType& topLevelParams); 1.90 +0 -185 xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp Index: XSLTEngineImpl.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- XSLTEngineImpl.cpp 2001/02/16 19:50:22 1.89 +++ XSLTEngineImpl.cpp 2001/03/01 19:13:50 1.90 @@ -2507,185 +2507,6 @@ -// $$$ ToDo: Get rid of this!!! See ElemPI, ElemSort, etc. These have strings instead of -// AVT instances... -XalanDOMString -XSLTEngineImpl888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4valuateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue, - XPathExecutionContext& executionContext) -{ - XalanDOMString expressedValue; - - StringTokenizer tokenizer(stringedValue, theTokenDelimiterCharacters, true); - - const unsigned int nTokens = tokenizer.countTokens(); - - if(nTokens < 2) - { - expressedValue = stringedValue; // then do the simple thing - } - else - { - XalanDOMString buffer; - XalanDOMString t; // base token - XalanDOMString lookahead; // next token - XalanDOMString error; // if not empty, break from loop - - while(tokenizer.hasMoreTokens()) - { - if(length(lookahead) != 0) - { - t = lookahead; - clear(lookahead); - } - else t = tokenizer.nextToken(); - - if(length(t) == 1) - { - switch(charAt(t, 0)) - { - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charApostrophe: - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charQuoteMark: - { - // just keep on going, since we're not in an attribute template - append(buffer, t); - break; - } - case(XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charLeftCurlyBracket): - { - // Attr template start - lookahead = tokenizer.nextToken(); - if(equals(lookahead, theLeftCurlyBracketString)) - { - // Double curlys mean escape to show curly - append(buffer, lookahead); - clear(lookahead); - break; // from switch - } - /* - else if(equals(lookahead, XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charQuoteMar) || - equals(lookahead, XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charApostrophe)) - { - // Error. Expressions can not begin with quotes. - error = "Expressions can not begin with quotes."; - break; // from switch - } - */ - else - { - XalanDOMString expression = lookahead; // Probably should make into StringBuffer - - while(0 != length(lookahead) && !equals(lookahead, theRightCurlyBracketString)) - { - lookahead = tokenizer.nextToken(); - if(length(lookahead) == 1) - { - switch(charAt(lookahead, 0)) - { - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charApostrophe: - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charQuoteMark: - { - // String start - expression += lookahead; - XalanDOMString quote = lookahead; - // Consume stuff 'till next quote - lookahead = tokenizer.nextToken(); - while(!equals(lookahead, quote)) - { - expression += lookahead; - lookahead = tokenizer.nextToken(); - } - expression += lookahead; - break; - } - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charLeftCurlyBracket: - { - // What's another curly doing here? - error = TranscodeFromLocalCodePage("Error: Can not have \"{\" within expression."); - break; - } - case XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charRightCurlyBracket: - { - // Proper close of attribute template. - // Evaluate the expression. - const XObjectPtr xobj = - evalXPathStr(expression, contextNode, namespaceContext, executionContext); - - append(buffer, xobj->str()); - - clear(lookahead); // breaks out of inner while loop - break; - } - default: - { - // part of the template stuff, just add it. - expression += lookahead; - } - } // end inner switch - } // end if lookahead length == 1 - else - { - // part of the template stuff, just add it. - expression += lookahead; - } - } // (0 != length(lookahead) && !equals(lookahead, "}")) - - if(length(error) != 0) - { - break; // from inner while loop - } - } - break; - } - case(XalanUnico888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4charRightCurlyBracket): - { - lookahead = tokenizer.nextToken(); - if(equals(lookahead, theRightCurlyBracketString)) - { - // Double curlys mean escape to show curly - append(buffer, lookahead); - clear(lookahead); // swallow - } - else - { - // Illegal, I think... - warn("Found \"}\" but no attribute template open!"); - append(buffer, theRightCurlyBracketString); - // leave the lookahead to be processed by the next round. - } - break; - } - default: - { - // Anything else just add to string. - append(buffer, t); - } - } // end switch t - } // end if length == 1 - else - { - // Anything else just add to string. - append(buffer, t); - } - - if(0 != length(error)) - { - warn("Attr Template, " + error); - - break; - } - } // end while(tokenizer.hasMoreTokens()) - - expressedValue = buffer; - } // end else nTokens > 1 - - return expressedValue; -} - - - void XSLTEngineImpl888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4opyAttributeToTarget( const XalanAttr& attr, @@ -2697,13 +2518,7 @@ const XalanDOMString attrName = trim(attr.getName()); XalanDOMString stringedValue = attr.getValue(); -// stringedValue = evaluateAttrVal(contextNode, -// namespaceContext, -// stringedValue); - // evaluateAttrVal might return a null value if the template expression - // did not turn up a result, in which case I'm going to not add the - // attribute. // TODO: Find out about empty attribute template expression handling. if(0 != length(stringedValue)) { 1.62 +0 -7 xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp Index: XSLTEngineImpl.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- XSLTEngineImpl.hpp 2001/01/31 01:42:20 1.61 +++ XSLTEngineImpl.hpp 2001/03/01 19:13:51 1.62 @@ -260,13 +260,6 @@ XalanNode* sourceTree, XalanNode* xmlNode); - virtual XalanDOMString - evaluateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue, - XPathExecutionContext& executionContext); - virtual void resolveTopLevelParams(StylesheetExecutionContext& executionContext); 1.19 +0 -20 xml-xalan/c/src/XSLT/XSLTProcessor.hpp Index: XSLTProcessor.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessor.hpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- XSLTProcessor.hpp 2001/01/16 02:50:03 1.18 +++ XSLTProcessor.hpp 2001/03/01 19:13:52 1.19 @@ -256,26 +256,6 @@ setExecutionContext(StylesheetExecutionContext* theExecutionContext) = 0; /** - * Evaluates attribute values for attribute templates (Stuff in curly {} - * braces that hold expressions). - * - * @param contextNode current node in the source tree - * @param namespaceContext current namespace context for the - * pattern-by-example structures when parsing - * expressions - * @param stringedValue attribute value to be processed - * @param executionContext current execution context - * @return processed stringedValue with attribute templates resolved - * @exception XSLProcessorException - */ - virtual XalanDOMString - evaluateAttrVal( - XalanNode* contextNode, - const PrefixResolver& namespaceContext, - const XalanDOMString& stringedValue, - XPathExecutionContext& executionContext) = 0; - - /** * Resolve the params that were pushed by the caller. */ virtual void From lindsey32@example.net Thu Mar 1 19:55:04 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 18289 invoked by uid 1033); 1 Mar 2001 19:55:04 -0000 Date: 1 Mar 2001 19:55:04 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/test/java/src/org/apache/qetest/xslwrapper TraxWrapper.java curcuru 01/03/01 11:55:03 Modified: test/java/src/org/apache/qetest/trax/sax SAXResultAPITest.java SAXTransformerFactoryAPITest.java TemplatesHandlerAPITest.java test/java/src/org/apache/qetest/xslwrapper TraxWrapper.java Log: Updates to make TraxWrapper and trax.* be completely JAXP 1.1 compliant; removed or changed references to Xalan's serializers to use JAXP ways to do things Revision Changes Path 1.3 +12 -10 xml-xalan/test/java/src/org/apache/qetest/trax/sax/SAXResultAPITest.java Index: SAXResultAPITest.java =================================================================== RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/sax/SAXResultAPITest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SAXResultAPITest.java 2001/02/08 17:49:36 1.2 +++ SAXResultAPITest.java 2001/03/01 19:54:51 1.3 @@ -82,11 +82,6 @@ import org.w3c.dom.Node; -// Xalan-J 2.x serializers (sould be changed to use just -// identity transformer for this functionality) -import org.apache.xalan.serialize.SerializerFactory; -import org.apache.xalan.serialize.Serializer; - // java classes import java.io.File; import java.io.FileOutputStream; @@ -97,7 +92,7 @@ /** * API Coverage test for the SAXResult class of TRAX. * @author lindsey32@example.net - * @version $Id: SAXResultAPITest.java,v 1.2 2001/02/08 17:49:36 curcuru Exp $ + * @version $Id: SAXResultAPITest.java,v 1.3 2001/03/01 19:54:51 curcuru Exp $ */ public class SAXResultAPITest extends XSLProcessorTestBase { @@ -326,11 +321,18 @@ // Use simple Xalan serializer for disk output, setting // the stylesheet's output properties into it Properties outProps = streamTemplates.getOutputProperties(); - Serializer serializer = SerializerFactory.getSerializer(outProps); + // Use a TransformerHandler for serialization: this + // supports ContentHandler and can replace the + // Xalan/Xerces specific Serializers we used to use + TransformerHandler tHandler = saxFactory.newTransformerHandler(); FileOutputStream fos = new FileOutputStream(outNames.nextName()); - reporter.logTraceMsg("serializer.setOutputStream(new FileOutputStream(" + outNames.currentName() + ")"); - serializer.setOutputStream(fos); - SAXResult saxResult = new SAXResult(serializer.asContentHandler()); + //Serializer serializer = SerializerFactory.getSerializer(outProps); + //reporter.logTraceMsg("serializer.setOutputStream(new FileOutputStream(" + outNames.currentName() + ")"); + //serializer.setOutputStream(fos); + //SAXResult saxResult = new SAXResult(serializer.asContentHandler()); // use other ContentHandler + Result realResult = new StreamResult(fos); + tHandler.setResult(realResult); + SAXResult saxResult = new SAXResult(tHandler); // Just do a normal transform to this result Transformer transformer = streamTemplates.newTransformer(); 1.5 +18 -27 xml-xalan/test/java/src/org/apache/qetest/trax/sax/SAXTransformerFactoryAPITest.java Index: SAXTransformerFactoryAPITest.java =================================================================== RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/sax/SAXTransformerFactoryAPITest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SAXTransformerFactoryAPITest.java 2001/02/08 17:49:42 1.4 +++ SAXTransformerFactoryAPITest.java 2001/03/01 19:54:52 1.5 @@ -76,11 +76,6 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; -// Use Xalan's own serializers for SAX ContentHandler output -import org.apache.xalan.serialize.SerializerFactory; -import org.apache.xalan.serialize.Serializer; -import org.apache.xalan.templates.OutputProperties; - // Needed SAX, DOM, JAXP classes import org.w3c.dom.Document; import org.w3c.dom.Node; @@ -103,7 +98,7 @@ * API Coverage test for SAXTransformerFactory. * @author lindsey32@example.net * @author lindsey32@example.net - * @version $Id: SAXTransformerFactoryAPITest.java,v 1.4 2001/02/08 17:49:42 curcuru Exp $ + * @version $Id: SAXTransformerFactoryAPITest.java,v 1.5 2001/03/01 19:54:52 curcuru Exp $ */ public class SAXTransformerFactoryAPITest extends XSLProcessorTestBase { @@ -713,17 +708,16 @@ TransformerFactory tfactory = TransformerFactory.newInstance(); try { + SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory; // The transformer will use a SAX parser as it's reader. XMLReader reader = XMLReaderFactory.createXMLReader(); // Set the result handling to be a serialization to the file output stream. - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); FileOutputStream fos = new FileOutputStream(outNames.nextName()); - serializer.setOutputStream(fos); -// reader.setContentHandler(new ExampleContentHandler(outNames.nextName())); // @todo update content handler!!!! - reader.setContentHandler(serializer.asContentHandler()); // @todo update content handler!!!! + Result realResult = new StreamResult(fos); + TransformerHandler tHandler = saxTFactory.newTransformerHandler(); + tHandler.setResult(realResult); + reader.setContentHandler(tHandler); - SAXTransformerFactory saxTFactory = (SAXTransformerFactory) tfactory; reporter.logTraceMsg("saxTFactory.newXMLFilter(new StreamSource(" + filenameToURL(xslName) + "))"); XMLFilter filter = saxTFactory.newXMLFilter(new StreamSource(filenameToURL(xslName))); @@ -779,12 +773,11 @@ XMLReader reader = XMLReaderFactory.createXMLReader(); // Set the result handling to be a serialization to the file output stream. - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); FileOutputStream fos = new FileOutputStream(outNames.nextName()); - serializer.setOutputStream(fos); -// reader.setContentHandler(new ExampleContentHandler(outNames.nextName())); // @todo update content handler!!!! - reader.setContentHandler(serializer.asContentHandler()); // @todo update content handler!!!! + Result realResult = new StreamResult(fos); + TransformerHandler tHandler = saxTFactory.newTransformerHandler(); + tHandler.setResult(realResult); + reader.setContentHandler(tHandler); filter.setParent(reader); @@ -837,12 +830,11 @@ XMLReader reader = XMLReaderFactory.createXMLReader(); // Set the result handling to be a serialization to the file output stream. - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); FileOutputStream fos = new FileOutputStream(outNames.nextName()); - serializer.setOutputStream(fos); -// reader.setContentHandler(new ExampleContentHandler(outNames.nextName())); // @todo update content handler!!!! - reader.setContentHandler(serializer.asContentHandler()); // @todo update content handler!!!! + Result realResult = new StreamResult(fos); + TransformerHandler tHandler = saxTFactory.newTransformerHandler(); + tHandler.setResult(realResult); + reader.setContentHandler(tHandler); filter.setParent(reader); // Now, when you call transformer.parse, it will set itself as @@ -899,12 +891,11 @@ filter.setParent(reader); // Set the result handling to be a serialization to the file output stream. - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); FileOutputStream fos = new FileOutputStream(outNames.nextName()); - serializer.setOutputStream(fos); -// filter.setContentHandler(new ExampleContentHandler(outNames.nextName())); // @todo update content handler!!!! - filter.setContentHandler(serializer.asContentHandler()); // @todo update content handler!!!! + Result realResult = new StreamResult(fos); + TransformerHandler tHandler = saxTFactory.newTransformerHandler(); + tHandler.setResult(realResult); + filter.setContentHandler(tHandler); // Log what output is about to be created reporter.logTraceMsg("filter.parse(" + xmlName + ") into: " + outNames.currentName()); 1.4 +1 -6 xml-xalan/test/java/src/org/apache/qetest/trax/sax/TemplatesHandlerAPITest.java Index: TemplatesHandlerAPITest.java =================================================================== RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/sax/TemplatesHandlerAPITest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TemplatesHandlerAPITest.java 2001/02/08 17:49:46 1.3 +++ TemplatesHandlerAPITest.java 2001/03/01 19:54:53 1.4 @@ -84,11 +84,6 @@ import org.w3c.dom.Node; -// Xalan-J 2.x serializers (sould be changed to use just -// identity transformer for this functionality) -import org.apache.xalan.serialize.SerializerFactory; -import org.apache.xalan.serialize.Serializer; - // java classes import java.io.File; import java.io.FileOutputStream; @@ -99,7 +94,7 @@ /** * API Coverage test for the TemplatesHandler class of TRAX. * @author lindsey32@example.net - * @version $Id: TemplatesHandlerAPITest.java,v 1.3 2001/02/08 17:49:46 curcuru Exp $ + * @version $Id: TemplatesHandlerAPITest.java,v 1.4 2001/03/01 19:54:53 curcuru Exp $ */ public class TemplatesHandlerAPITest extends XSLProcessorTestBase { 1.12 +1 -6 xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TraxWrapper.java Index: TraxWrapper.java =================================================================== RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TraxWrapper.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- TraxWrapper.java 2001/02/23 21:01:20 1.11 +++ TraxWrapper.java 2001/03/01 19:54:59 1.12 @@ -93,12 +93,7 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -// Xalan-specific serializers for sax-to-sax flavor -import org.apache.xalan.serialize.SerializerFactory; -import org.apache.xalan.serialize.Serializer; -import org.apache.xalan.templates.OutputProperties; - /** * Implementation of a ProcessorWrapper for a TrAX-compilant XSLT processor. * <p>Currently defaults to the Xalan 2.x implementation, although @@ -108,7 +103,7 @@ * @todo share constants between TraxWrapper, SaxonWrapper * @todo document how we perform various types of transforms * @author Shane Curcuru - * @version $Id: TraxWrapper.java,v 1.11 2001/02/23 21:01:20 curcuru Exp $ + * @version $Id: TraxWrapper.java,v 1.12 2001/03/01 19:54:59 curcuru Exp $ */ public class TraxWrapper extends ProcessorWrapper { From lindsey32@example.net Thu Mar 1 20:09:01 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 41492 invoked by uid 1031); 1 Mar 2001 20:09:01 -0000 Date: 1 Mar 2001 20:09:01 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/test/tests/conf/namespace namespace46.xsl namespace45.xsl namespace44.xsl dmarston 01/03/01 12:08:59 Modified: test/tests/conf/namespace namespace46.xsl namespace45.xsl namespace44.xsl Log: Improve comments and layout. Revision Changes Path 1.2 +10 -10 xml-xalan/test/tests/conf/namespace/namespace46.xsl Index: namespace46.xsl =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/namespace/namespace46.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- namespace46.xsl 2001/02/12 20:19:03 1.1 +++ namespace46.xsl 2001/03/01 20:08:55 1.2 @@ -6,22 +6,22 @@ <!-- DocVersion: 19991116 --> <!-- Section: 7.1.3 Creating Attributes --> <!-- Creator: Philip Strube --> - <!-- Purpose: Test for resetting of a specified default namespace. --> + <!-- Purpose: Create attribute with NCName and newly-introduced namespace. --> + <!-- Processor will have to invent a prefix because none has been established for that namespace. --> +<xsl:output method="xml"/> -<xsl:output method="xml"/> - <xsl:template match="/"> - <xsl:apply-templates/> + <xsl:apply-templates/> </xsl:template> <xsl:template match="*"> - <xsl:copy> - <xsl:attribute name="objectID" namespace="http://www.fiscus.de"> - <xsl:number level="any" count="*"/> - </xsl:attribute> - <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/> - </xsl:copy> + <xsl:copy> + <xsl:attribute name="objectID" namespace="http://www.fiscus.de"> + <xsl:number level="any" count="*"/> + </xsl:attribute> + <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/> + </xsl:copy> </xsl:template> </xsl:stylesheet> 1.2 +6 -6 xml-xalan/test/tests/conf/namespace/namespace45.xsl Index: namespace45.xsl =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/namespace/namespace45.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- namespace45.xsl 2001/02/12 20:19:03 1.1 +++ namespace45.xsl 2001/03/01 20:08:56 1.2 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding="ISO-8859-1"?> -<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' +<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' xmlns:fiscus="http://www.fiscus.de"> <!-- FileName: namespace45 --> @@ -7,9 +7,9 @@ <!-- DocVersion: 19991116 --> <!-- Section: 7.1.3 Creating Attributes --> <!-- Creator: Philip Strube --> - <!-- Purpose: Test for resetting of a specified default namespace. --> + <!-- Purpose: Create attribute with QName whose prefix is known. --> -<xsl:output method="xml"/> +<xsl:output method="xml"/> <xsl:template match="/"> <xsl:apply-templates/> @@ -17,9 +17,9 @@ <xsl:template match="*"> <xsl:copy> - <xsl:attribute name="fiscus:objectID"> - <xsl:number level="any" count="*"/> - </xsl:attribute> + <xsl:attribute name="fiscus:objectID"> + <xsl:number level="any" count="*"/> + </xsl:attribute> <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> 1.2 +7 -10 xml-xalan/test/tests/conf/namespace/namespace44.xsl Index: namespace44.xsl =================================================================== RCS file: /home/cvs/xml-xalan/test/tests/conf/namespace/namespace44.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- namespace44.xsl 2001/02/12 20:19:03 1.1 +++ namespace44.xsl 2001/03/01 20:08:56 1.2 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding="ISO-8859-1"?> -<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' +<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' xmlns:fiscus="http://www.fiscus.de"> <!-- FileName: namespace44 --> @@ -7,22 +7,19 @@ <!-- DocVersion: 19991116 --> <!-- Section: 7.1.3 Creating Attributes --> <!-- Creator: Philip Strube --> - <!-- Purpose: Test for resetting of a specified default namespace. --> + <!-- Purpose: Create attribute with QName and namespace which restates same URI. --> +<xsl:output method="xml"/> -<xsl:output method="xml"/> - <xsl:template match="/"> - <xsl:apply-templates/> + <xsl:apply-templates/> </xsl:template> <xsl:template match="*"> <xsl:copy> - <xsl:attribute name="fiscus:objectID" namespace="http://www.fiscus.de"> -<!-- <xsl:attribute name="fiscus:objectID"> --> -<!-- <xsl:attribute name="objectID" namespace="http://www.fiscus.de"> --> - <xsl:number level="any" count="*"/> - </xsl:attribute> + <xsl:attribute name="fiscus:objectID" namespace="http://www.fiscus.de"> + <xsl:number level="any" count="*"/> + </xsl:attribute> <xsl:apply-templates select="@*|node()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> From lindsey32@example.net Thu Mar 1 20:10:00 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 42032 invoked by uid 1015); 1 Mar 2001 20:10:00 -0000 Date: 1 Mar 2001 20:10:00 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/java commits.xml build.xml dleslie 01/03/01 12:10:00 Modified: java build.xml Added: java commits.xml Log: Build prepare.docs now transforms commits.xml, extracted from our Notes copy of the commits, generating DONE for inclusion in readme.html. Revision Changes Path 1.86 +17 -10 xml-xalan/java/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-xalan/java/build.xml,v retrieving revision 1.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- build.xml 2001/02/08 14:26:01 1.85 +++ build.xml 2001/03/01 20:09:57 1.86 @@ -46,7 +46,7 @@ - Much of this file stolen from Stefano's xml-xerces build.xml - $Id: build.xml,v 1.85 2001/02/08 14:26:01 dleslie Exp $ + $Id: build.xml,v 1.86 2001/03/01 20:09:57 dleslie Exp $ ==================================================================== --> @@ -103,7 +103,7 @@ <property name="xdocs.book" value="${xdocs.dir}/sources/xalan-jlocal.xml"/> <property name="xdocs.style" value="${xdocs.dir}/style"/> <property name="xalanonly-styledocs" - value="dtd/xsl-html40s.dtd,dtd/spec.dtd,stylesheets/patterns.xsl,stylesheets/notice.xsl,stylesheets/spec.xsl,stylesheets/bugs.xsl,loaderdesign.xml,stylesheets/design2project.xsl,stylesheets/designdoc2html.xsl,stylesheets/xml2fo.xsl"/> + value="dtd/xsl-html40s.dtd,dtd/spec.dtd,stylesheets/patterns.xsl,stylesheets/notice.xsl,stylesheets/spec.xsl,stylesheets/bugs.xsl,stylesheets/done.xsl,loaderdesign.xml,stylesheets/design2project.xsl,stylesheets/designdoc2html.xsl,stylesheets/xml2fo.xsl"/> <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> <property name="doc.generator.styletargz" value="${xdocs.dir}/xml-site-style.tar.gz"/> <property name="doc.generator.styletar" value="${xdocs.dir}/xml-site-style.tar"/> @@ -136,10 +136,16 @@ <java fork="yes" classname="org.apache.xalan.xslt.Process" classpath="${java.class.path}:${build.dir}/$xalan.jar"> <arg line="-in todo.xml -xsl todo.xsl -out ${build.docs}/todo.html"/> </java> - <!-- We use a Notes agent to extract Xalan-Java 2 bugs from our SPR database into bugs.xml. The following operation + <!-- We use a Notes agent to extract Xalan-Java 2 bugs from our SPR database into commits.xml. The following operation transforms bugs.xml (just including open bugs) and puts the result in xdocs/sources/xalan for inclusion in the readme.xml --> <java fork="yes" classname="org.apache.xalan.xslt.Process" classpath="${java.class.path}:${build.dir}/$xalan.jar"> <arg line="-in bugs.xml -xsl ${xdocs.style}/stylesheets/bugs.xsl -out ${xdocs.dir}/sources/xalan/BUGS"/> + </java> + <!-- We use a Notes agent to extract Xalan-Java 2 commits from our team database into bugs.xml. The following operation + transforms commits.xml (just including source code commits) and puts the result in xdocs/sources/xalan for inclusion in the + readme.xml --> + <java fork="yes" classname="org.apache.xalan.xslt.Process" classpath="${java.class.path}:${build.dir}/$xalan.jar"> + <arg line="-in commits.xml -xsl ${xdocs.style}/stylesheets/done.xsl -out ${xdocs.dir}/sources/xalan/DONE"/> </java> <!-- Generate the Xalan-J2 design document --> <java fork="yes" classname="${doc.generator}" @@ -331,8 +337,8 @@ <!-- must be on the classpath --> <!-- =================================================================== --> <target name="servlet" depends="jar" - description="Compile and jar the servlet sample" > - <echo message="To compile and run the sample servlet, javax.servlet and javax.servlet.http must be on the classpath"/> + description="Compile and jar the servlet samples" > + <echo message="To compile the sample servlets, javax.servlet and javax.servlet.http must be on the classpath"/> <mkdir dir="${build.samples}/servlet"/> <javac srcdir="${samples.dir}/servlet" classpath="${java.class.path}:${build.xalan.jar}" destdir="${build.samples}" @@ -341,8 +347,9 @@ <fileset dir="${samples.dir}/servlet" includes="media.properties,default.xsl,default2.xsl"/> </copy> - <jar jarfile="${build.dir}/xalanservlet.jar" basedir="${build.samples}" - includes="servlet/**"/> + <jar jarfile="${build.dir}/xalanservlet.jar" + basedir="${build.samples}" + includes="servlet/**"/> </target> <!-- =================================================================== --> @@ -482,7 +489,7 @@ <copy file="${build.compat.jar}" todir="${dist.dir}/bin"/> <copy todir="${dist.dir}"> - <fileset dir="." includes="readme.html,KEYS,License,build.xml,build.sh,build.bat,todo.xml,todo.xsl,bugs.xml"/> + <fileset dir="." includes="readme.html,KEYS,License,build.xml,build.sh,build.bat,todo.xml,todo.xsl,bugs.xml,commits.xml"/> </copy> <zip zipfile="${build.dir}/${dist.file}.zip" basedir="${build.dir}" includes="${dist.file}/**"/> @@ -703,7 +710,7 @@ includes="media.properties,default.xsl,default2.xsl"/> </copy> <jar jarfile="${build.compat.samples}/xalancompatservlet.jar" basedir="${build.compat.samples}" - includes="servlet/**"/> + includes="servlet/**"/> </target> - + </project> 1.1 xml-xalan/java/commits.xml Index: commits.xml =================================================================== <?xml version="1.0"?> <Commits> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src compatOverview.html</Modified> <Log>Fixed spelling error.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java XSLTResultTarget.java</Modified> <Log>Implement some more methods for compatibility</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java</Modified> <Log>Fixed javadoc for api that was just added back.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTResultTarget.java</Modified> <Log>Fixed javadoc for api that was just added back.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java</Modified> <Log>Fix problem with calling the processor with a liaison</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/02/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java</Modified> <Log>Fix problem where source file was being parsed more than once and if using an input stream, we would get a read error</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/06/2001</DateCommitted> <Modified>java/src/org/apache/xpath/axes ChildWalkerMultiStep.java</Modified> <Log>Fix for bug reported by "Chris P. McCabe" &lt;lindsey32@example.net&gt; 02/06/2001 06:55 PM. Defensive fix for if the last used walker is null, then don't check to see if it is a fast walker! Without this, a null pointer exception is very possible.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/06/2001</DateCommitted> <Modified>java/src/org/apache/xalan/transformer TransformerImpl.java</Modified> <Log>Fixes for exceptions being thrown that weren't being passed through the error listener.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/07/2001</DateCommitted> <Modified>java/src/org/apache/xpath/axes FollowingWalker.java</Modified> <Log>Fix for bug reported by Dave Haffner &lt;lindsey32@example.net&gt; 02/06/2001 04:03 AM In parentNode(), don't screen out nextAncestor, since the parent is never actually returned. This sets things up correctly for firstChild and nextSibling.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/07/2001</DateCommitted> <Modified>java/src/org/apache/xpath/axes PrecedingWalker.java</Modified> <Log>Fix for bug reported by Dave Haffner &lt;lindsey32@example.net&gt; 02/06/2001 04:03 AM In nextSibling(), don't return null if isAncestorOfRootContext, instead do next.getFirstChild().</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/07/2001</DateCommitted> <Modified>java/src/org/apache/xpath SourceTreeManager.java</Modified> <Log>Fix for bug reported by lindsey32@example.net 02/07/2001 09:35 AM removed extra bogus TransformerException decl in resolveURI</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/08/2001</DateCommitted> <Modified>java/src/org/apache/xalan/stree SourceTreeHandler.java</Modified> <Log>Fix bug reported by Jason Harrop &lt;lindsey32@example.net&gt; 02/07/2001 08:12 PM Don't process comment or whitespace events if inside a startDTD/endDTD event.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/10/2001</DateCommitted> <Modified>java/src/org/apache/xpath/axes WalkerFactory.java</Modified> <Log>In indirect response to bug posted by "Thee Boon Hoo" &lt;lindsey32@example.net&gt; 02/07/2001 09:37 PM "//table[1]" patterns would give one node when they should have given 2, when applied to Boon Hoo's source. "//table[1]" is equivelent to "/descendant-or-sel888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4node()/table[1]", and so must return the first table child of each table-inst element. An optimization was optimizing this to "/descendant-or-sel888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4table, which is fine as long as indexing isn't used. Since we can not tell until runtime if indexing is being used, we have to turn of this optimization for all predicated "//foo[xx]" patterns.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/12/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java</Modified> <Log>Set system id in stylesheet handler</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/12/2001</DateCommitted> <Modified>java/src/org/apache/xalan/processor StylesheetPIHandler.java TransformerFactoryImpl.java</Modified> <Log>Patch for Dmitri IIyin to use the specified URIResolver.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/12/2001</DateCommitted> <Modified>java/src/org/apache/xalan/templates ElemNumber.java</Modified> <Log>Number Expression should be evaluated then rounded up.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/xdocs/style/stylesheets xml2fo.xsl</Modified> <Log>Added processing for &lt;source&gt; elements, i.e., code.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/xdocs/sources/xalan usagepatterns.xml</Modified> <Log>Fixed typo in class name.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/src/org/apache/xalan/xslt Process.java</Modified> <Log>Create a document fragment for the output node, for -flavor d2d.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/src/org/apache/xpath/compiler Compiler.java</Modified> <Log>Better error message when quo is used.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/src/org/apache/xalan/templates ElemCallTemplate.java ElemChoose.java ElemCopy.java ElemFallback.java ElemIf.java ElemLiteralResult.java ElemTemplate.java java/src/org/apache/xalan/transformer TransformerImpl.java</Modified> <Log>Remove extra method/call to TransformerImpl.executeChildTemplates()</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/xdocs/sources/xalan DONE history.xml</Modified> <Log>preliminary updates for next release.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/src/org/apache/xpath/patterns NodeTest.java</Modified> <Log>Return an empty string instead of null from getLocalName() when the nodetest does not have a name. Encountered with the SQL extension, in response to bug reported by "Michael Kay" &lt;lindsey32@example.net&gt;, 02/08/2001 08:57 AM.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/13/2001</DateCommitted> <Modified>java/src/org/apache/xalan/lib/sql ColumnData.java</Modified> <Log>In getData() return an empty string instead of null if there is no data to be obtained. In response to bug reported by "Michael Kay" &lt;lindsey32@example.net&gt;, 02/08/2001 08:57 AM.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/14/2001</DateCommitted> <Modified>java/xdocs/style/stylesheets xml2fo.xsl</Modified> <Log>Added support for images.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/14/2001</DateCommitted> <Modified>java/xdocs/sources/xalan DONE</Modified> <Log>Added SQL library bug fixes.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/14/2001</DateCommitted> <Modified>java/xdocs/sources/xalan faq.xml usagepatterns.xml</Modified> <Log>1. Added item on classpath problems using the IBM JDK 1.3. 2. Added usage patern note on change in handling of string stylesheet parameters from Xalan-J 1 to Xalan-J 2.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/14/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTInputSource.java</Modified> <Log>Call local setSystemId.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/15/2001</DateCommitted> <Modified>java/xdocs/style/stylesheets xml2fo.xsl</Modified> <Log>Added processing for &lt;br/&gt;.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/15/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java</Modified> <Log>Fix problem with processing an input source created from a reader with no systemId Fix problem with reading an input source file twice if it has a PI</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/16/2001</DateCommitted> <Modified>java/xdocs/style/stylesheets xml2fo.xsl</Modified> <Log>Tried to refine use of keep-with-next. This component is currently broken.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/19/2001</DateCommitted> <Modified>java/src/org/apache/xalan/extensions MethodResolver.java</Modified> <Log>Correct ConversionInfo array for Node-Set and RTF. Remove DocumentFragment from RTF and replace with NodeList. Remove duplicate Boolean from both. Fix Boolean conversion to make java.lang.Boolean higher than string.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/19/2001</DateCommitted> <Modified>java/xdocs/sources/xalan extensions.xml</Modified> <Log>Correct ConversionInfo array for Node-Set and RTF. Remove DocumentFragment from RTF and replace with NodeList. Remove duplicate Boolean from both. Fix Boolean conversion to make java.lang.Boolean higher than string.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/19/2001</DateCommitted> <Modified>java/src/org/apache/xalan/lib/sql ColumnHeader.java RowSet.java XStatement.java</Modified> <Log>Use null nodetest to mean the same as "node()". This fixes a bug reported by "Voytenko, Dimitry" &lt;lindsey32@example.net&gt; where &lt;xsl:copy-of select="sql:query(...)"/&gt; crashes with NullPointerException, i.e. there are cases where we really don't want to set the NodeTest.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/20/2001</DateCommitted> <Modified>java/xdocs/sources/xalan overview.xml resources.xml</Modified> <Log>Updated two links.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/20/2001</DateCommitted> <Modified>java/xdocs/sources/xalan overview.xml</Modified> <Log>Updated ref to XSL spec.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/20/2001</DateCommitted> <Modified>java/xdocs/sources/xalan DONE</Modified> <Log>More bug fixes.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/20/2001</DateCommitted> <Modified>java/src/org/apache/xpath/compiler XPathParser.java</Modified> <Log>Check for null token before checking if it is a letter</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/20/2001</DateCommitted> <Modified>java/src/org/apache/xalan/transformer TransformerIdentityImpl.java</Modified> <Log>Fix made for bug reported by "Glencross, Christian" &lt;lindsey32@example.net&gt; on 02/16/2001 10:18 AM. Xerces 1.2.3 SAX parser calls handler.setDocumentLocator() before handler.startDocument(). TransformerIdentityImpl.m_resultContentHandler isn't initialised until TransformerIdentityImpl.startDocument() is called. Added lazy construction of result handler in setDocumentLocator, in addition to startDocument.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/21/2001</DateCommitted> <Modified>java/src/org/apache/xalan/lib Extensions.java</Modified> <Log>Correct implementation of string value of a node.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/21/2001</DateCommitted> <Modified>java/src/org/apache/xalan/lib/sql Column.java ColumnAttribute.java ColumnData.java ColumnHeader.java Row.java RowSet.java StreamableNode.java XConnection.java XStatement.java package.html</Modified> <Log>Added experimental usage metatag to all classes in this package, and an explanatory note to package.html.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/21/2001</DateCommitted> <Modified>java/xdocs/sources/xalan extensionslib.xml</Modified> <Log>Added explanatory note about experimental nature of this extensions package.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/21/2001</DateCommitted> <Modified>java/xdocs/sources/xalan commandline.xml</Modified> <Log>Removed -validate flag from command-line options.</Log> </Commit> <Commit category="compat"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Modified>java/compat_src/org/apache/xalan/xslt StylesheetRoot.java</Modified> <Log>Add getOutputMethod API.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Modified>java/src/org/apache/xalan/stree ElementImpl.java</Modified> <Log>Bug fix attributed to Norman Walsh &lt;lindsey32@example.net&gt;, on 02/20/2001 09:50 AM. if the attribute 'name' doesn't occur in the AttList, the result of getIndex(name) is -1, but getChildAttribute() would incorrectly return the first attribute. Fix returns null if index &lt; 0.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Added>java/samples/servlet SimpleXSLTServlet.java XSLTServletWithParams.java</Added> <Log>Simpler servlet samples</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Modified>java/src/org/apache/xalan/serialize SerializerToXML.java java/src/org/apache/xalan/transformer TransformerIdentityImpl.java</Modified> <Log>Implement DeclHandler for identity transforms</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Modified>java/xdocs/sources/xalan DONE samples.xml usagepatterns.xml</Modified> <Log>Added info on servlets and 2 new samples. More bug fixes in "DONE".</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/22/2001</DateCommitted> <Modified>java/src/org/apache/xalan/transformer TransformerImpl.java</Modified> <Log>Fix for bug originally reported by Daryl Beattie &lt;lindsey32@example.net&gt; on 02/14/2001 04:16 PM. A hang was occuring inside the use of a Result Tree Fragment. When the result tree fragement was being created, the Redirect extension was being called, which called createResultContentHandler which set the ContentHandler in the Transformer, but not in the ResultTreeHandler. Then, Redirect called Transformer#executeChildTemplates( ElemTemplateElement elem, Node sourceNode, QName mode, ContentHandler handler) which saves the reference to the original content handler in the transformer, and then sets the new one by calling setContentHandler, which sets the ContentHandler in the ResultTreeHandler as well as the Transformer. When it tried to restore the old ContentHandler, it restored the value in the ResultTreeHandler to a Serializer, instead of the correct ContentHandler. When transformToRTF then called endDocument on it's resultTreeFragment, the event was sent to the Serializer instead of the SourceTreeHandler, and thus the isComplete flag was not set, and thus the hang. (whew!) The fix is in executeChildTemplates save the value of the resultTreeHandler's contentHandler as well as Transformer's content handler, and restore them both. A more architectual fix could be made, but not without high risk, so I think this is the best and safest way to fix it.</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/23/2001</DateCommitted> <Modified>java/xdocs/sources entities.ent xalan-jsite.xml</Modified> <Log>Changed version to 2.0.1</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/23/2001</DateCommitted> <Modified>java/xdocs/sources/xalan readme.xml</Modified> <Log>Changed version to 2.0.1</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/23/2001</DateCommitted> <Modified>java/src/org/apache/xalan/res XSLTInfo.properties</Modified> <Log>Changed version to 2.0.1</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/23/2001</DateCommitted> <Modified>java/src/org/apache/xalan/processor XSLProcessorVersion.java</Modified> <Log>Changed version to 2.0.1</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/23/2001</DateCommitted> <Modified>java/bin xerces.jar</Modified> <Log>version 1.3 from Xerces-J-Tools.1.3.0.zip</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/27/2001</DateCommitted> <Modified>java/bin xerces.jar</Modified> <Log>Returning to Xerces 1.2.3. Release 1.3 generates the following error: [java] http://www.w3.org/1999/XSL/Transform grammar not found [java] java.lang.NoSuchMethodError: org.w3c.dom.Node: method isSupported(Ljava/lang/String;Ljava/lang/String;)Z not found...</Log> </Commit> <Commit category="other"> <Who>lindsey32@example.net</Who> <DateCommitted>02/27/2001</DateCommitted> <Modified>java/bin xerces.jar</Modified> <Log>The real Xerces-J 1.3.0. The xerces.jar in the xerces-1_3_0 binary distribution is OLD. I built the jar from the src distribution, and it appears to work fine.</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/28/2001</DateCommitted> <Modified>java/src/org/apache/xalan/res XSLTErrorResources.java</Modified> <Log>Update text of error messages Submitted by: Andreas Zehnpfund</Log> </Commit> <Commit category="core"> <Who>lindsey32@example.net</Who> <DateCommitted>02/28/2001</DateCommitted> <Modified>java/src/org/apache/xalan/xslt Process.java</Modified> <Log>Update printArgOptions() with better text and to better reflect actual options that are currently supported; catch missing -IN argument</Log> </Commit> </Commits> From lindsey32@example.net Thu Mar 1 20:11:03 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 44224 invoked by uid 1015); 1 Mar 2001 20:11:03 -0000 Date: 1 Mar 2001 20:11:02 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/java/xdocs/sources/xalan DONE dleslie 01/03/01 12:11:02 Removed: java/xdocs/sources/xalan DONE Log: Removed from repository. Now generated during doc build from xml-xalan/javba/commits.xml From lindsey32@example.net Thu Mar 1 20:27:57 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 72152 invoked by uid 1031); 1 Mar 2001 20:27:57 -0000 Date: 1 Mar 2001 20:27:57 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/test/tests/conf/lre lre19.xsl lre19.xml dmarston 01/03/01 12:27:57 Added: test/tests/conf/lre lre19.xsl lre19.xml Log: New case: names with leading underscores. Revision Changes Path 1.1 xml-xalan/test/tests/conf/lre/lre19.xsl Index: lre19.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:_ped="http://www.ped.com"> <!-- FileName: lre19 --> <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> <!-- Section: 7.1.2 Creating Elements with xsl:element. --> <!-- Creator: David Marston --> <!-- Purpose: Test use of leading underscore in names. --> <xsl:template match="/"> <root> <xsl:text>&#10;</xsl:text> <xsl:element name="_an_elem" namespace="{docs/a/@href}"/> <xsl:text>&#10;</xsl:text> <xsl:element name="_ped:_an_elem"/> </root> </xsl:template> </xsl:stylesheet> 1.1 xml-xalan/test/tests/conf/lre/lre19.xml Index: lre19.xml =================================================================== <?xml version="1.0"?> <docs> <a href="http://www.ped.com">Out1</a> </docs> From lindsey32@example.net Thu Mar 1 20:28:26 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 73460 invoked by uid 1031); 1 Mar 2001 20:28:26 -0000 Date: 1 Mar 2001 20:28:26 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/test/tests/conf-gold/lre lre19.out dmarston 01/03/01 12:28:26 Added: test/tests/conf-gold/lre lre19.out Log: New case: names with leading underscores. Revision Changes Path 1.1 xml-xalan/test/tests/conf-gold/lre/lre19.out Index: lre19.out =================================================================== <?xml version="1.0" encoding="UTF-8"?> <root xmlns:_ped="http://www.ped.com"> <_an_elem xmlns="http://www.ped.com"/> <_ped:_an_elem/></root> From lindsey32@example.net Thu Mar 1 20:41:52 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 94691 invoked by uid 1015); 1 Mar 2001 20:41:52 -0000 Date: 1 Mar 2001 20:41:52 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/java/xdocs/style/stylesheets done.xsl dleslie 01/03/01 12:41:51 Added: java/xdocs/style/stylesheets done.xsl Log: Stylesheet for generating DONE for inclusion in readme.xml. Revision Changes Path 1.1 xml-xalan/java/xdocs/style/stylesheets/done.xsl Index: done.xsl =================================================================== <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE xsl:stylesheet> <!-- XSL Style sheet, DTD omitted --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="Commits"> <xsl:comment>This XML fragment contains a list of source code updates to place in an &lt;s3&gt; section of readme.xml</xsl:comment> <xsl:if test="count(Commit[@category='core'])>0"> <p>Core source code updates:</p> <ul> <xsl:for-each select="Commit[@category='core']"> <li><xsl:apply-templates select="Who|DateCommitted|Modified|Added|Removed|Log"/></li> </xsl:for-each> </ul> </xsl:if> <xsl:if test="count(Commit[@category='core'])=0"> <note>This release includes no updates of the core source code.</note> </xsl:if> <xsl:if test="count(Commit[@category='compat'])>0"> <p>Compatibility source code updates:</p> <ul> <xsl:for-each select="Commit[@category='compat']"> <li><xsl:apply-templates select="Who|DateCommitted|Modified|Added|Removed|Log"/></li> </xsl:for-each> </ul> </xsl:if> <xsl:if test="count(Commit[@category='compat'])=0"> <note>This release includes no updates of the compatibility source code.</note> </xsl:if> </xsl:template> <xsl:template match="Who"> <ref>Committed by </ref><xsl:value-of select="."/> </xsl:template> <xsl:template match="DateCommitted"> <ref> on </ref><xsl:value-of select="."/><br/> </xsl:template> <xsl:template match="Modified"> <ref>Modified: </ref><xsl:value-of select="."/><br/> </xsl:template> <xsl:template match="Added"> <ref>Added: </ref><xsl:value-of select="."/><br/> </xsl:template> <xsl:template match="Removed"> <ref>Removed: </ref><xsl:value-of select="."/><br/> </xsl:template> <xsl:template match="Log"> <ref>Committer's log entry: </ref><xsl:value-of select="."/><br/><br/> </xsl:template> </xsl:stylesheet> From lindsey32@example.net Thu Mar 1 21:50:34 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 5110 invoked by uid 1033); 1 Mar 2001 21:50:34 -0000 Date: 1 Mar 2001 21:50:34 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/test/java/src/org/apache/qetest/xsl PerfEverythingTestlet.java curcuru 01/03/01 13:50:33 Added: test/java/src/org/apache/qetest/xsl PerfEverythingTestlet.java Log: Special Performance testlet designed to capture perf data similarly to how one XalanC performance test gets data Revision Changes Path 1.1 xml-xalan/test/java/src/org/apache/qetest/xsl/PerfEverythingTestlet.java Index: PerfEverythingTestlet.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xalan" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact lindsey32@example.net. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 2000, Lotus * Development Corporation., http://www.lotus.com. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ /* * * PerfEverythingTestlet.java * */ package org.apache.qetest.xsl; import org.apache.qetest.*; import org.apache.qetest.xslwrapper.ProcessorWrapper; import java.io.File; import java.util.Hashtable; /** * Testlet to capture specific timing performance data. * This Testlet attempts to mirror what one of our Xalan-C * performance tests does, at least as well as we can compare * Java processing to the C processing model. * Note that as a standalone Testlet, this class does waaaay too * much stuff: Testlets should really be smaller test algorithims * than here. However for performance measurements and reporting * purposes, we really need to do it all here. * * @author lindsey32@example.net * @version $Id: PerfEverythingTestlet.java,v 1.1 2001/03/01 21:50:32 curcuru Exp $ */ public class PerfEverythingTestlet extends TestletImpl { // Initialize our classname for TestletImpl's main() method static { thisClassName = "org.apache.qetest.xsl.PerfEverythingTestlet"; } // Initialize our defaultDatalet { defaultDatalet = (Datalet)new PerformanceDatalet(); } /** * Accesor method for a brief description of this test. * * @return String describing what this PerfEverythingTestlet does. */ public String getDescription() { return "PerfEverythingTestlet: processes supplied file in multiple ways over multiple iterations and logs timing data"; } /** Markers for performance logging - Preload time. */ public static final String PERF_PRELOAD = "UPre;"; /** Markers for performance logging - single iteration time. */ public static final String PERF_ITERATION = "UItr;"; /** Markers for performance logging - average of iteration times. */ public static final String PERF_AVERAGE = "UAvg;"; /** Markers for memory logging. */ public static final String PERF_MEMORY = "UMem;"; /** * Run this PerfEverythingTestlet: execute it's test and return. * This algorithim processes the supplied file in several * different ways: * <ul> * <li>Run one full end-to-end transform and log timing * (a 'preload' process: note that results may vary for this * timing depending on whether you run this Testlet standalone * or if you're using StylesheetTestletDriver to run it, due at * least to classloading issues, if nothing else)</li> * <li>Preprocess the stylesheet once and log timing</li> * <li>Process that preprocessed stylesheet once and log timing</li> * <li>Loop iterations times and preprocess the stylesheet, * then do a transform with it, and log each time</li> * <li>Loop iterations times and do a full end-to-end transform * and log each time</li> * </ul> * * @param Datalet to use as data point for the test. */ public void execute(Datalet d) { StylesheetDatalet datalet = null; try { datalet = (StylesheetDatalet)d; } catch (ClassCastException e) { logger.checkErr("Datalet provided is not a StylesheetDatalet; cannot continue"); return; } // Cleanup outName - delete the file on disk try { File outFile = new File(datalet.outputName); boolean btmp = outFile.delete(); logger.logMsg(Logger.TRACEMSG, "Deleting OutFile o888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4" + datalet.outputName + " status: " + btmp); } catch (SecurityException se) { logger.logMsg(Logger.WARNINGMSG, "Deleting OutFile o888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4" + datalet.outputName + " threw: " + se.toString()); // But continue anyways... } // Setup: Save options from the datalet in convenience variables int iterations = 10; boolean preload = true; try { iterations = Integer.parseInt(datalet.options.getProperty("iterations")); } catch (Exception e) { /* no-op, leave as default */ } try { preload = (new Boolean(datalet.options.getProperty("preload"))).booleanValue(); } catch (Exception e) { /* no-op, leave as default */ } // Setup: store various timing data in convenience variables long singletransform = 0L; // Very first Preload end-to-end transform long etoe = 0L; // First end-to-end transform during iterations long avgetoe = 0L; // Average of end-to-end transforms during iterations long parsexsl = 0L; // First stylesheet preprocess during iterations long avgparsexsl = 0L; // Average of stylesheet preprocess during iterations long unparsedxml = 0L; // First stylesheet process during iterations long avgunparsedxml = 0L;// Average of stylesheet process during iterations // Setup: Store local copies of XSL, XML references for // potential change to URLs String inputName = datalet.inputName; String xmlName = datalet.xmlName; if (datalet.useURL) { // inputName may not exist if it's an embedded test if (null != inputName) inputName = QetestUtils.filenameToURL(inputName); xmlName = QetestUtils.filenameToURL(xmlName); } // Go do performance stuff! try { // Setup: Create a new ProcessorWrapper of appropriate flavor ProcessorWrapper processorWrapper = ProcessorWrapper.getWrapper(datalet.flavor); if (null == processorWrapper.createNewProcessor(null)) { logger.checkErr("ERROR: could not create processorWrapper, aborting."); return; } logger.logMsg(Logger.TRACEMSG, "executing with: inputName=" + inputName + " xmlName=" + xmlName + " outputName=" + datalet.outputName + " goldName=" + datalet.goldName + " flavor=" + datalet.flavor + " iterations=" + iterations + " preload=" + preload + " algorithim=" + getDescription()); //@todo make various logMemory calls optional logMemory(true); // Measure(singletransform): Very first Preload end-to-end transform singletransform = processorWrapper.processToFile(xmlName, inputName, datalet.outputName); if (singletransform == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: Preload0 error with:" + datalet.inputName); return; } logMemory(true); // Measure(parsexsl): once: first preprocess parsexsl = processorWrapper.preProcessStylesheet(inputName); if (parsexsl == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: Preload1 error with:" + datalet.inputName); return; } // Measure(unparsedxml): once: first process unparsedxml = processorWrapper.processToFile(xmlName, datalet.outputName); if (unparsedxml == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: Preload2 error with:" + datalet.inputName); return; } for (int ctr = 1; ctr <= iterations; ctr++) { // Measure(avgparsexsl): average preprocess long preprocessTime = processorWrapper.preProcessStylesheet(inputName); if (preprocessTime == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: PreprocessLoop1 error iter(" + ctr + ") with:" + datalet.inputName); return; } avgparsexsl += preprocessTime; // Measure(avgunparsedxml): average process long processTime = processorWrapper.processToFile(xmlName, datalet.outputName); if (processTime == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: PreprocessLoop2 error iter(" + ctr + ") with:" + datalet.inputName); return; } avgunparsedxml += processTime; logMemory(false); } // Measure(etoe): once: first full process etoe = processorWrapper.processToFile(xmlName, inputName, datalet.outputName); if (etoe == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: Process error with:" + datalet.inputName); return; } for (int ctr = 1; ctr <= iterations; ctr++) { // Measure(avgetoe): average full process long retVal = processorWrapper.processToFile(xmlName, inputName, datalet.outputName); if (retVal == ProcessorWrapper.ERROR) { logger.checkFail("ERROR: ProcessLoop error iter(" + ctr + ") with:" + datalet.inputName); return; } avgetoe += retVal; logMemory(false); } // Log special performance element with our timing Hashtable attrs = new Hashtable(); // idref is the individual filename attrs.put("idref", (new File(datalet.inputName)).getName()); // inputName is the actual name we gave to the processor attrs.put("inputName", inputName); attrs.put("singletransform", new Long(singletransform)); // Very first Preload end-to-end transform attrs.put("etoe", new Long(etoe)); // First end-to-end transform during iterations attrs.put("avgetoe", new Long(avgetoe / iterations)); // Average of end-to-end transforms during iterations attrs.put("parsexsl", new Long(parsexsl)); // First stylesheet preprocess during iterations attrs.put("avgparsexsl", new Long(avgparsexsl / iterations)); // Average of stylesheet preprocess during iterations attrs.put("unparsedxml", new Long(unparsedxml)); // First stylesheet process during iterations attrs.put("avgunparsedxml", new Long(avgunparsedxml / iterations)); // Average of stylesheet process during iterations logger.logElement(Logger.STATUSMSG, "perf", attrs, PERF_ITERATION); } catch (Throwable t) { logger.checkFail("PerfEverythingTestlet with:" + datalet.inputName + " threw: " + t.toString()); java.io.StringWriter sw = new java.io.StringWriter(); java.io.PrintWriter pw = new java.io.PrintWriter(sw); t.printStackTrace(pw); logger.logArbitrary(Logger.ERRORMSG, sw.toString()); return; } // If we get here, attempt to validate the contents of // the last outputFile created CheckService fileChecker = new XHTFileCheckService(); if (Logger.PASS_RESULT != fileChecker.check(logger, new File(datalet.outputName), new File(datalet.goldName), getDescription() + ", " + datalet.getDescription()) ) logger.logMsg(Logger.WARNINGMSG, "Failure reason: " + fileChecker.getExtendedInfo()); } /** * Worker method: just reports Runtime.totalMemory/freeMemory. */ protected void logMemory(boolean doGC) { if (doGC) { Runtime.getRuntime().gc(); } logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().freeMemory(), 0, PERF_MEMORY + "freeMemory"); logger.logStatistic(Logger.STATUSMSG, Runtime.getRuntime().totalMemory(), 0, PERF_MEMORY + "totalMemory"); } } // end of class PerfEverythingTestlet From lindsey32@example.net Thu Mar 1 22:11:00 2001 Return-Path: <lindsey32@example.net> Mailing-List: contact lindsey32@example.net; run by ezmlm Delivered-To: mailing list lindsey32@example.net Received: (qmail 37955 invoked by uid 1032); 1 Mar 2001 22:11:00 -0000 Date: 1 Mar 2001 22:11:00 -0000 Message-ID: <lindsey32@example.net> From: lindsey32@example.net To: lindsey32@example.net Subject: cvs commit: xml-xalan/c/Tests/Performance perf.cpp pauldick 01/03/01 14:11:00 Modified: c/Tests/Performance perf.cpp Log: Updates to use new FileReporter logElement() Revision Changes Path 1.11 +58 -46 xml-xalan/c/Tests/Performance/perf.cpp Index: perf.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/Tests/Performance/perf.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- perf.cpp 2001/02/23 22:38:34 1.10 +++ perf.cpp 2001/03/01 22:10:58 1.11 @@ -106,10 +106,25 @@ #endif +#if defined(XALAN_NO_NAMESPACES) + typedef vector<XalanDOMString> FileNameVectorType; +#else + typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XalanDOMString> FileNameVectorType; +#endif + + +#if defined(XALAN_NO_NAMESPACES) + typedef map<XalanDOMString, XalanDOMString, less<XalanDOMString> > Hashtable; +#else + typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4map<XalanDOMString, XalanDOMString> Hashtable; +#endif + const char* const excludeStylesheets[] = { - "basic-all_well.xml", +// "basic-all_well.xml", "large-evans_large.xml", +// "sort-cem-big.xml", +// "large-cem10k.xml", 0 }; @@ -227,6 +242,18 @@ return endTime - startTime; } +void +addMetricToAttrs(char* desc, double theMetric, Hashtable& attrs) +{ + XalanDOMString temp; + + DoubleToDOMString(theMetric, temp); + attrs.insert(Hashtabl888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4value_type(XalanDOMString(desc), temp)); + + return; +} + + bool getParams(int argc, const char* argv[], @@ -256,11 +283,8 @@ return true; } -#if defined(XALAN_NO_NAMESPACES) - typedef vector<XalanDOMString> FileNameVectorType; -#else - typedef st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<XalanDOMString> FileNameVectorType; -#endif + + int main( @@ -302,33 +326,34 @@ // Define some constants for file suffixes ... const XalanDOMString XSLSuffix(XALAN_STATIC_UCODE_STRING(".xsl")); const XalanDOMString XMLSuffix(XALAN_STATIC_UCODE_STRING(".xml")); - const XalanDOMString outputDir(XALAN_STATIC_UCODE_STRING("\\xslt-results\\perf\\test\\")); + const XalanDOMString outputRoot(XALAN_STATIC_UCODE_STRING("d:\\xslt\\cperf-results\\")); const XalanDOMString pathSep(XALAN_STATIC_UCODE_STRING("\\")); - const XalanDOMString outputSuffix(XALAN_STATIC_UCODE_STRING(".out")); - // Define some variables used for timing... - clock_t startTime, endTime, accmTime; - double timeinMilliseconds, theAverage; - - for(FileNameVectorTyp888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4size_type j = 0; j < dirs.size(); j++) { const FileNameVectorType files = f.getTestFileNames(perfDir, dirs[j]); for(FileNameVectorTyp888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4size_type i = 0; i < files.size(); i++) { + // Define variables used for timing and reporting ... + clock_t startTime, endTime, accmTime; + double timeinMilliseconds, theAverage; + Hashtable attrs; + + attrs.insert(Hashtabl888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4value_type(XalanDOMString("File"), files[i])); + if (skip) { if (checkForExclusion(files[i])) continue; } - // Output file name to result log. - logFile.logTestCaseInit(files[i]); const XalanDOMString theXMLFile= perfDir + dirs[j] + pathSep + files[i]; const XalanDOMString theXSLFile = f.GenerateFileName(theXMLFile,"xsl"); - const XalanDOMString theOutputFile = f.GenerateFileName(theXMLFile, "out"); + const XalanDOMString theOutput = outputRoot + dirs[j] + pathSep + files[i]; + const XalanDOMString theOutputFile = f.GenerateFileName(theOutput, "out"); + attrs.insert(Hashtabl888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4value_type(XalanDOMString("href"), theXSLFile)); // Create the necessary support objects to instantiate a processor. XalanSourceTreeDOMSupport csDOMSupport; XalanSourceTreeParserLiaison csParserLiaison(csDOMSupport); @@ -378,27 +403,23 @@ // Calculate & report performance on stylesheet parse to console and log file. timeinMilliseconds = calculateElapsedTime(startTime, endTime); cout << " XSL parse: " << timeinMilliseconds << " milliseconds." << endl; - logFile.logStatistic(60, - long(timeinMilliseconds), - timeinMilliseconds, - "Parse of XSL: "); + addMetricToAttrs("Parse_XSL",timeinMilliseconds, attrs); + // Parse the input XML and report how long it took... startTime = clock(); XalanNode* const glbSourceXML = parseSourceDocument(theXMLFile, csProcessor); endTime = clock(); + assert(glbSourceXML != 0); // Calculate & report performance on source document parse to console and log file. timeinMilliseconds = calculateElapsedTime(startTime, endTime); cout << " XML parse: " << timeinMilliseconds << " milliseconds." << endl; - logFile.logStatistic(60, - long(timeinMilliseconds), - timeinMilliseconds, - "Parse of XML: "); + addMetricToAttrs("Parse_XML",timeinMilliseconds, attrs); - assert(glbSourceXML != 0); + // The execution context uses the same factory support objects as // the processor, since those objects have the same lifetime as // other objects created as a result of the execution. @@ -423,10 +444,7 @@ // Output single transform time to console and result log cout << " eTOe transform: " << etoetran << " milliseconds." << endl; - logFile.logStatistic(60, - etoetran, - etoetran, - "end To end transform: "); + addMetricToAttrs("eTOe", double(etoetran), attrs); // Perform a single transform using compiled stylesheet and report results... @@ -444,13 +462,14 @@ // Output single transform time to console and result log cout << " One transform w/Parsed XSL: " << timeinMilliseconds << " milliseconds." << endl; - logFile.logStatistic(60, - long(timeinMilliseconds), - timeinMilliseconds, - "Single transform took: "); + addMetricToAttrs("Single_Transform",timeinMilliseconds, attrs); + // Perform multiple transforms and calculate the average time .. accmTime = 0; + + addMetricToAttrs("Iterations",iterCount, attrs); + for(int j = 0; j < iterCount; ++j) { accmTime += transformWParsedSource(glbSourceXML, @@ -466,13 +485,9 @@ // Output average transform time to console and result log cout << " Avg: " << theAverage << " for " << iterCount << " iter's w/Parsed XML" << endl; - char tmp[100]; - sprintf(tmp, "%s%d%s","Avg: transform of ", iterCount, " iter's w/Parsed XML."); - logFile.logStatistic(60, - long(theAverage), - theAverage, - tmp); + addMetricToAttrs("Ave_Parsed_XML",theAverage, attrs); + // This is currently how the XalanJ 2.0 is performing transforms, // i.e. with the unparsed XML Source. @@ -488,15 +503,12 @@ csParserLiaison.reset(); // This deletes the document } theAverage = accmTime / iterCount; - cout << " Avg: " << theAverage << " for " << iterCount << " iter's w/Source XML" << endl; + cout << " Avg: " << theAverage << " for " << iterCount << " iter's w/UnParsed XML" << endl; + + addMetricToAttrs("Ave_UnParsed_XML",theAverage, attrs); - sprintf(tmp, "%s%d%s","Avg: transform of ", iterCount, " iter's w/Source XML."); - logFile.logStatistic(60, - long(theAverage), - theAverage, - tmp); -
{'source': 'Apache Software Foundation Public Mail Archives'}