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 2003/09/19 02:12:50 UTC

cvs commit: xml-xalan/c/src/xalanc/XSLT ElemEmpty.cpp ElemTemplateElement.cpp ElemTemplateElement.hpp ElemTextLiteral.cpp

dbertoni    2003/09/18 17:12:50

  Modified:    c/src/xalanc/XSLT ElemEmpty.cpp ElemTemplateElement.cpp
                        ElemTemplateElement.hpp ElemTextLiteral.cpp
  Log:
  Fixed construction confusion and added URI for better error reporting.
  
  Revision  Changes    Path
  1.2       +5 -3      xml-xalan/c/src/xalanc/XSLT/ElemEmpty.cpp
  
  Index: ElemEmpty.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemEmpty.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElemEmpty.cpp	29 Jun 2003 03:58:07 -0000	1.1
  +++ ElemEmpty.cpp	19 Sep 2003 00:12:50 -0000	1.2
  @@ -77,9 +77,10 @@
   			const XalanDOMString*			elementName) :
   	ElemTemplateElement(constructionContext,
   						stylesheetTree,
  +						StylesheetConstructionContext::ELEMNAME_UNDEFINED,
  +						XalanDOMString(),
   						lineNumber,
  -						columnNumber,
  -						StylesheetConstructionContext::ELEMNAME_UNDEFINED),
  +						columnNumber),
   	m_elementName(elementName)
   {
   }
  @@ -87,10 +88,11 @@
   
   
   ElemEmpty::ElemEmpty(
  -			StylesheetConstructionContext&	/* constructionContext */,
  +			StylesheetConstructionContext&	constructionContext,
   			Stylesheet&						stylesheetTree,
   			const XalanDOMString*			elementName) :
   	ElemTemplateElement(
  +			constructionContext,
   			stylesheetTree,
   			StylesheetConstructionContext::ELEMNAME_UNDEFINED),
   	m_elementName(elementName)
  
  
  
  1.5       +6 -5      xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.cpp
  
  Index: ElemTemplateElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemTemplateElement.cpp	2 Aug 2003 01:07:48 -0000	1.4
  +++ ElemTemplateElement.cpp	19 Sep 2003 00:12:50 -0000	1.5
  @@ -148,10 +148,12 @@
   
   
   ElemTemplateElement::ElemTemplateElement(
  +			StylesheetConstructionContext&	constructionContext,
   			Stylesheet&						stylesheetTree,
  +			int								xslToken,
  +			const XalanDOMString&			baseURI,
   			int								lineNumber,
  -			int								columnNumber,
  -			int								xslToken) :
  +			int								columnNumber) :
   	PrefixResolver(),
   	m_stylesheet(stylesheetTree),
   	m_namespacesHandler(),
  @@ -162,7 +164,7 @@
   	m_nextSibling(0),
   	m_previousSibling(0),
   	m_firstChild(0),
  -	m_baseIndentifier(s_emptyString),
  +	m_baseIndentifier(constructionContext.getPooledString(baseURI)),
   	m_locatorProxy(*this),
   	m_flags(eCanGenerateAttributes)
   {
  @@ -580,8 +582,7 @@
   	assert(newChild->getXSLToken() != StylesheetConstructionContext::ELEMNAME_TEXT);
   	assert(newChild->getXSLToken() != StylesheetConstructionContext::ELEMNAME_UNDEFINED);
   
  -	if (newChild->isWhitespace() == false &&
  -		childTypeAllowed(newChild->getXSLToken()) == false)
  +	if (childTypeAllowed(newChild->getXSLToken()) == false)
   	{
   		throw XalanDOMException(XalanDOMException::HIERARCHY_REQUEST_ERR);
   	}
  
  
  
  1.3       +4 -0      xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp
  
  Index: ElemTemplateElement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElemTemplateElement.hpp	15 Jul 2003 01:04:54 -0000	1.2
  +++ ElemTemplateElement.hpp	19 Sep 2003 00:12:50 -0000	1.3
  @@ -131,15 +131,19 @@
   	 * Special constructor used by dummy elements which do not exist in the
   	 * final stylesheet.
   	 * 
  +	 * @param constructionContext  context when object constructed
   	 * @param stylesheetTree	   owning stylesheet
  +	 * @param baseURI              The base URI of the XSLT file where the element occurs.
   	 * @param lineNumber		   line in the XSLT file where the element occurs
   	 * @param columnNumber		   column index in the XSLT file where the
   	 *							   element occurs
   	 * @param xslToken			   an integer representing the type of instance.
   	 */
   	ElemTemplateElement(
  +			StylesheetConstructionContext&	constructionContext,
   			Stylesheet& 					stylesheetTree,
   			int 							xslToken,
  +			const XalanDOMString&			baseURI = XalanDOMString(),
   			int 							lineNumber = XalanLocator::getUnknownValue(),
   			int 							columnNumber = XalanLocator::getUnknownValue());
   
  
  
  
  1.2       +5 -2      xml-xalan/c/src/xalanc/XSLT/ElemTextLiteral.cpp
  
  Index: ElemTextLiteral.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemTextLiteral.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElemTextLiteral.cpp	29 Jun 2003 03:58:07 -0000	1.1
  +++ ElemTextLiteral.cpp	19 Sep 2003 00:12:50 -0000	1.2
  @@ -67,6 +67,7 @@
   
   
   #include "Constants.hpp"
  +#include "Stylesheet.hpp"
   #include "StylesheetConstructionContext.hpp"
   #include "StylesheetExecutionContext.hpp"
   
  @@ -87,10 +88,12 @@
   			bool							fPreserveSpace,
               bool							fDisableOutputEscaping) :
   	ElemTemplateElement(
  +		constructionContext,
   		stylesheetTree,
  +		StylesheetConstructionContext::ELEMNAME_TEXT_LITERAL_RESULT,
  +		stylesheetTree.getBaseIdentifier(),
   		lineNumber,
  -		columnNumber,
  -		StylesheetConstructionContext::ELEMNAME_TEXT_LITERAL_RESULT),
  +		columnNumber),
   	m_isWhitespace(isXMLWhitespace(ch, start, length)),
   	// Always null-terminate our buffer, since we may need it that way.
   	m_ch(constructionContext.allocateXalanDOMCharVector(ch + start, length, true)),
  
  
  

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