Re: Validating with XML::LibXML::RelaxNG?
Rodent of Unusual Size <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Organization | CPAN |
| Message-ID | <[email protected]> |
Petr Pajas wrote: > > I just looked into the libxml2 source code to find out that it stores > some per-node psvi information based on previous successful > validation. If the node->psvi pointer equals the pointer to the > definition it is currently being tested against, the validation of > that node is skipped. This means that nodes that were once valid > remain valid. By looking at the code I'm rather convinced this is > considered a feature, not a bug. > > Not sure how to deal with this in XML::LibXML. Options include: > > - clear psvi on every change of the tree (ugly, since this involves > too many lines) > - traverse the tree and clear psvi before each validation (safe, but > probably redundant for freshly parsed documents) > - expose an API to clear psvi before validation > > Which would you prefer/suggest (Ken, list, ...)? (sorry for the delay.) I'd say leave the default behaviour as-is, but expose some sort of flag that indicates that the document is live and should be validated anew each time. Thanks! -- #ken P-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ "Millennium hand and shrimp!" _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs