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...@locus.apache.org on 2000/05/11 21:07:29 UTC

cvs commit: xml-xalan/c/src/XSLT StylesheetHandler.cpp

dbertoni    00/05/11 12:07:29

  Modified:    c/src/XSLT StylesheetHandler.cpp
  Log:
  Fixed bug where an exception was being thrown when encountering higher XSLT version numbers.
  
  Revision  Changes    Path
  1.24      +11 -4     xml-xalan/c/src/XSLT/StylesheetHandler.cpp
  
  Index: StylesheetHandler.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetHandler.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StylesheetHandler.cpp	2000/05/08 17:29:36	1.23
  +++ StylesheetHandler.cpp	2000/05/11 19:07:29	1.24
  @@ -821,12 +821,19 @@
   				break;
   
   			default:
  -			  // If this stylesheet is declared to be of a higher version than the one
  -				  // supported, don't flag an error.
  -				if(XSLTEngineImpl::getXSLTVerSupported() < m_stylesheet.getXSLTVerDeclared())
   				{
   					XalanDOMString msg("Unknown XSL element: " + localName);
  -					throw SAXException(toCharArray(msg));
  +
  +					// If this stylesheet is declared to be of a higher version than the one
  +					// supported, don't flag an error.
  +					if(XSLTEngineImpl::getXSLTVerSupported() < m_stylesheet.getXSLTVerDeclared())
  +					{
  +						m_constructionContext.warn(msg);
  +					}
  +					else
  +					{
  +						throw SAXException(toCharArray(msg));
  +					}
   				}
   			}
   		  }