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/06/21 22:48:07 UTC

cvs commit: xml-xalan/c/src/XMLSupport FormatterToHTML.cpp

dbertoni    01/06/21 13:48:05

  Modified:    c/src/XMLSupport FormatterToHTML.cpp
  Log:
  Updated flags for boolean attributes.
  
  Revision  Changes    Path
  1.57      +16 -7     xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp
  
  Index: FormatterToHTML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- FormatterToHTML.cpp	2001/05/14 01:00:38	1.56
  +++ FormatterToHTML.cpp	2001/06/21 20:48:01	1.57
  @@ -287,7 +287,6 @@
   				getElemDesc(name);
   
   		const bool	isBlockElement = elemDesc.is(ElemDesc::BLOCK);
  -		const bool	isHeadElement = elemDesc.is(ElemDesc::HEADELEM);
   
   		m_isScriptOrStyleElem = 
   				equalsIgnoreCaseASCII(name, c_wstr(s_scriptString)) ||
  @@ -331,7 +330,7 @@
       
   		m_isprevtext = false;
   
  -		if (isHeadElement)
  +		if (elemDesc.is(ElemDesc::HEADELEM) == true)
   		{
   			writeParentTagEnd();
   
  @@ -345,7 +344,10 @@
   		}
   
   		// We've written the first element, so turn off the flag...
  -		m_isFirstElement = false;
  +		if (m_isFirstElement == true)
  +		{
  +			m_isFirstElement = false;
  +		}
   
   		assert(m_elementLevel > 0);
   	}
  @@ -754,7 +756,6 @@
   FormatterToHTML::accumCommentData(const XalanDOMChar*	data)
   {
   	accumName(data);
  -//	writeCharacters(data);
   }
   
   
  @@ -801,8 +802,8 @@
   {
       accumContent(XalanUnicode::charSpace);
   
  -    if(elemDesc.isAttrFlagSet(name, ElemDesc::ATTREMPTY) == true &&
  -       (length(value) == 0) || equalsIgnoreCaseASCII(value, name) == true)
  +    if((length(value) == 0 || equalsIgnoreCase(name, value)) &&
  +	   elemDesc.isAttrFlagSet(name, ElemDesc::ATTREMPTY) == true)
       {
   		accumName(name);
       }
  @@ -1267,11 +1268,15 @@
   			c_wstr(XALAN_STATIC_UCODE_STRING("MAP")),
   			ElemDesc(0|ElemDesc::SPECIAL|ElemDesc::ASPECIAL|ElemDesc::BLOCK)));
   
  +	theResult =
   	theElementFlags.insert(
   		ElementFlagsMapType::value_type(
   			c_wstr(XALAN_STATIC_UCODE_STRING("AREA")),
   			ElemDesc(0|ElemDesc::EMPTY|ElemDesc::BLOCK)));
   
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("HREF")), ElemDesc::ATTRURL);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("NOHREF")), ElemDesc::ATTREMPTY);
  +
   	theElementFlags.insert(
   		ElementFlagsMapType::value_type(
   			c_wstr(XALAN_STATIC_UCODE_STRING("LINK")),
  @@ -1286,6 +1291,7 @@
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("SRC")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("LONGDESC")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("USEMAP")), ElemDesc::ATTRURL);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("ISMAP")), ElemDesc::ATTREMPTY);
   
   	theResult =
   	theElementFlags.insert(
  @@ -1298,6 +1304,7 @@
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("DATA")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("ARCHIVE")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("USEMAP")), ElemDesc::ATTRURL);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("DECLARE")), ElemDesc::ATTREMPTY);
   
   	theElementFlags.insert(
   		ElementFlagsMapType::value_type(
  @@ -1447,6 +1454,7 @@
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("USEMAP")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("CHECKED")), ElemDesc::ATTREMPTY);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("DISABLED")), ElemDesc::ATTREMPTY);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("ISMAP")), ElemDesc::ATTREMPTY);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("READONLY")), ElemDesc::ATTREMPTY);
   
   	theResult =
  @@ -1455,7 +1463,7 @@
   			c_wstr(XALAN_STATIC_UCODE_STRING("SELECT")),
   			ElemDesc(0|ElemDesc::FORMCTRL|ElemDesc::INLINELABEL)));
   
  -	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("READONLY")), ElemDesc::ATTREMPTY);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("DISABLED")), ElemDesc::ATTREMPTY);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("MULTIPLE")), ElemDesc::ATTREMPTY);
   
   	theResult =
  @@ -1603,6 +1611,7 @@
   
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("SRC")), ElemDesc::ATTRURL);
   	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("FOR")), ElemDesc::ATTRURL);
  +	(*theResult.first).second.setAttr(c_wstr(XALAN_STATIC_UCODE_STRING("DEFER")), ElemDesc::ATTREMPTY);
   
   	theElementFlags.insert(
   		ElementFlagsMapType::value_type(
  
  
  

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