hi, here is a quick patch to allow one to change an attribute's value when using the tidylib, it basically adds: void tidyAttrValueSet ( TidyAttr tattr, ctmbstr* val ); example: [...] if (!strcmp ( tidyAttrName ( attribute ), "value" )) tidyAttrValueSet ( attribute, tmbstrdup ( "foo" )); [...] best regards, /olivier --- tidy/src/tidylib.c.orig Thu Oct 9 12:58:03 2003 +++ tidy/src/tidylib.c Thu Oct 9 13:06:08 2003 @@ -1548,6 +1548,16 @@ aval = attval->value; return aval; } +void tidyAttrValueSet( TidyAttr tattr, ctmbstr* val ) +{ + AttVal* attval = tidyAttrToImpl( tattr ); + ctmbstr aval = NULL; + if ( attval ) { + if ( attval->value ) + free ( attval->value ); + attval->value = tmbstrdup ( val ); + } +} /* Null for pure HTML ctmbstr tidyAttrNsLocal( TidyAttr tattr )Received on Thursday, 9 October 2003 07:42:03 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 13:57:17 GMT