On Tue, Feb 14, 2006 at 01:46:37PM -0800, Osawa, Daniel K wrote:
> 
> I need to remove invalid attributes from my XML tree and would like to
> use the following function:
>  
> int xmlValidateAttributeDecl (xmlValidCtxtPtr ctxt, 
> xmlDocPtr doc, 
> xmlAttributePtr attr)

  You're confused, this is used to validate an 
   <!ATTR
declaration in a DTD. an xmlAttributePtr is not a pointer to an
attribute on an element but a pointer to an attribute declaration
on a DTD.

>  
> I have the xmlValidCtxtPtr, xmlDocPtr, and an xmlNodePtr at my disposal.
> I would like to iterate through the list of xmlAttrPtrs provided by the
> xmlNodePtr, and run xmlValidateAttributeDecl on each attribute so that I
> can remove any invalid attributes I come across.  

  The function doing some of it is xmlValidateOneAttribute(), but attribute
validity also mean that all required attributes must be present and that
won't cover it.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to