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 2001/12/19 23:03:25 UTC

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

dbertoni    01/12/19 14:03:25

  Modified:    c/src/XSLT ElemTemplate.cpp
  Log:
  Better error checking.
  
  Revision  Changes    Path
  1.20      +10 -1     xml-xalan/c/src/XSLT/ElemTemplate.cpp
  
  Index: ElemTemplate.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplate.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ElemTemplate.cpp	2001/09/19 21:20:46	1.19
  +++ ElemTemplate.cpp	2001/12/19 22:03:25	1.20
  @@ -139,12 +139,21 @@
   		}
   	}
   
  -	if(0 == m_matchPattern && m_name.isEmpty() == true)
  +	const bool	isEmptyName = m_name.isEmpty();
  +
  +	if(0 == m_matchPattern && isEmptyName == true)
   	{
   		constructionContext.error(
   				"xsl:template requires either a name or a match attribute",
   				0,
   				this);
  +	}
  +	else if (isEmptyName == false && isValidNCName(m_name.getLocalPart()) == false)
  +	{
  +		constructionContext.error(
  +			"xsl:template has an invalid 'name' attribute",
  +			0,
  +			this);
   	}
   }
   
  
  
  

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