You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/07/10 02:43:02 UTC

cvs commit: xml-xalan/c/src/XSLT StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp XSLTEngineImpl.cpp XSLTEngineImpl.hpp XSLTProcessor.hpp

dbertoni    2002/07/09 17:43:02

  Modified:    c/src/XSLT StylesheetExecutionContext.hpp
                        StylesheetExecutionContextDefault.cpp
                        StylesheetExecutionContextDefault.hpp
                        XSLTEngineImpl.cpp XSLTEngineImpl.hpp
                        XSLTProcessor.hpp
  Log:
  Changes for new select debugging interface.
  
  Revision  Changes    Path
  1.75      +6 -4      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.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- StylesheetExecutionContext.hpp	9 Jul 2002 06:19:40 -0000	1.74
  +++ StylesheetExecutionContext.hpp	10 Jul 2002 00:43:01 -0000	1.75
  @@ -1507,13 +1507,15 @@
   	/**
   	 * Compose a diagnostic trace of the current selection
   	 *
  -	 * @param theTemplate current context node
  -	 * @param nl          list of selected nodes
  +	 * @param theStylesheetElement The executing stylesheet element
  +	 * @param nl The list of selected nodes
  +	 * @param xpath A pointer to the XPath which generated the list of nodes, if any.
   	 */
   	virtual void
   	traceSelect(
  -			const XalanElement&		theTemplate,
  -			const NodeRefListBase&	nl) const = 0;
  +			const ElemTemplateElement&	theStylesheetElement,
  +			const NodeRefListBase&		nl,
  +			const XPath*				xpath) = 0;
   
   	enum eCaseOrder { eDefault, eLowerFirst, eUpperFirst };
   
  
  
  
  1.93      +4 -3      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.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- StylesheetExecutionContextDefault.cpp	9 Jul 2002 06:19:40 -0000	1.92
  +++ StylesheetExecutionContextDefault.cpp	10 Jul 2002 00:43:01 -0000	1.93
  @@ -1196,12 +1196,13 @@
   
   void
   StylesheetExecutionContextDefault::traceSelect(
  -			const XalanElement&		theTemplate,
  -			const NodeRefListBase&	nl) const
  +			const ElemTemplateElement&	theTemplate,
  +			const NodeRefListBase&		nl,
  +			const XPath*				xpath)
   {
   	assert(m_xsltProcessor != 0);
   
  -	m_xsltProcessor->traceSelect(theTemplate, nl);
  +	m_xsltProcessor->traceSelect(*this, theTemplate, nl, xpath);
   }
   
   
  
  
  
  1.80      +3 -2      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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- StylesheetExecutionContextDefault.hpp	9 Jul 2002 06:19:40 -0000	1.79
  +++ StylesheetExecutionContextDefault.hpp	10 Jul 2002 00:43:01 -0000	1.80
  @@ -667,8 +667,9 @@
   
   	virtual void
   	traceSelect(
  -			const XalanElement&		theTemplate,
  -			const NodeRefListBase&	nl) const;
  +			const ElemTemplateElement&	theStylesheetElement,
  +			const NodeRefListBase&		nl,
  +			const XPath*				xpath);
   
   	virtual int
   	collationCompare(
  
  
  
  1.147     +18 -14    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.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- XSLTEngineImpl.cpp	9 Jul 2002 06:19:40 -0000	1.146
  +++ XSLTEngineImpl.cpp	10 Jul 2002 00:43:01 -0000	1.147
  @@ -86,6 +86,7 @@
   
   #include <PlatformSupport/PrintWriter.hpp>
   #include <PlatformSupport/StringTokenizer.hpp>
  +#include <PlatformSupport/XalanLocator.hpp>
   #include <PlatformSupport/XalanUnicode.hpp>
   
   
  @@ -1153,8 +1154,8 @@
   
   	XalanDOMString			uri;
   
  -	int						lineNumber = -1;
  -	int 					columnNumber = -1;
  +	XalanLocator::size_type		lineNumber = -1;
  +	XalanLocator::size_type		columnNumber = -1;
   
   	if (locator != 0)
   	{
  @@ -1271,15 +1272,15 @@
   			const Locator&						locator,
   			const XalanNode*					sourceNode) const
   {
  -	const XalanDOMChar*			id = locator.getSystemId();
  +	const XalanDOMChar*		id = locator.getSystemId();
   
   	if (id == 0)
   	{
   		id = &theDummy;
   	}
   
  -	const int					lineNumber = locator.getLineNumber();
  -	const int 					columnNumber = locator.getColumnNumber();
  +	const XalanLocator::size_type	lineNumber = locator.getLineNumber();
  +	const XalanLocator::size_type 	columnNumber = locator.getColumnNumber();
   
   	if (m_problemListener != 0)
   	{
  @@ -1503,18 +1504,18 @@
   
   void
   XSLTEngineImpl::traceSelect(
  -			const XalanElement& 	theTemplate,
  -			const NodeRefListBase&	nl) const
  +			StylesheetExecutionContext& 	executionContext,
  +			const ElemTemplateElement&		theTemplate,
  +			const NodeRefListBase&			nl,
  +			const XPath*					xpath) const
   {
   	if (0 != m_diagnosticsPrintWriter)
   	{
   		XalanDOMString	msg = theTemplate.getNodeName() + XalanDOMString(XALAN_STATIC_UCODE_STRING(": "));
   
  -		XalanAttr*		attr = theTemplate.getAttributeNode(Constants::ATTRNAME_SELECT);
  -
  -		if(0 != attr)
  +		if(xpath != 0)
   		{
  -			msg += attr->getValue();
  +			msg += xpath->getExpression().getCurrentPattern();
   			msg += XALAN_STATIC_UCODE_STRING(", ");
   			msg += UnsignedLongToDOMString(nl.getLength());
   			msg += XALAN_STATIC_UCODE_STRING(" selected");
  @@ -1526,11 +1527,14 @@
   			msg += XALAN_STATIC_UCODE_STRING(" selected");
   		}
   
  -		attr = theTemplate.getAttributeNode(Constants::ATTRNAME_MODE);
  +		const XalanQName* const		mode = executionContext.getCurrentMode();
   
  -		if(0 != attr)
  +		if(mode != 0 && mode->isEmpty() == false)
   		{
  -			msg += XalanDOMString(XALAN_STATIC_UCODE_STRING(", mode = ")) + attr->getValue();
  +			msg += XALAN_STATIC_UCODE_STRING(", mode = {");
  +			msg += mode->getNamespace();
  +			msg += XALAN_STATIC_UCODE_STRING("}");
  +			msg += mode->getLocalPart();
   		}
   
   		m_diagnosticsPrintWriter->println(msg);
  
  
  
  1.88      +5 -3      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.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- XSLTEngineImpl.hpp	9 Jul 2002 06:19:40 -0000	1.87
  +++ XSLTEngineImpl.hpp	10 Jul 2002 00:43:01 -0000	1.88
  @@ -310,10 +310,12 @@
   	virtual void
   	setTraceSelects(bool	b);
   
  -	virtual void
  +	void
   	traceSelect(
  -			const XalanElement&		theTemplate,
  -			const NodeRefListBase&	nl) const;
  +			StylesheetExecutionContext& 	executionContext,
  +			const ElemTemplateElement&		theTemplate,
  +			const NodeRefListBase&			nl,
  +			const XPath*					xpath) const;
   
   	virtual void
   	setQuietConflictWarnings(bool	b);
  
  
  
  1.29      +9 -4      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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XSLTProcessor.hpp	9 Jul 2002 06:19:40 -0000	1.28
  +++ XSLTProcessor.hpp	10 Jul 2002 00:43:01 -0000	1.29
  @@ -96,6 +96,7 @@
   class XMLParserLiaison;
   class XObject;
   class XObjectPtr;
  +class XPath;
   class XPathExecutionContext;
   class XSLTInputSource;
   class XSLTResultTarget;
  @@ -384,13 +385,17 @@
   	/**
   	 * Compose a diagnostic trace of the current selection
   	 *
  -	 * @param theTemplate current context node
  -	 * @param nl          list of selected nodes
  +	 * @param executionContext The current execution context
  +	 * @param theStylesheetElement The executing stylesheet element
  +	 * @param nl The list of selected nodes
  +	 * @param xpath A pointer to the XPath which generated the list of nodes, if any.
   	 */
   	virtual void
   	traceSelect(
  -			const XalanElement&		theTemplate,
  -			const NodeRefListBase&	nl) const = 0;
  +			StylesheetExecutionContext& 	executionContext,
  +			const ElemTemplateElement&		theStylesheetElement,
  +			const NodeRefListBase&			nl,
  +			const XPath*					xpath) const = 0;
   
   	/**
   	 * If the quietConflictWarnings property is set to 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org