Re: Validating with XML::LibXML::RelaxNG?
Vaclav Barta <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 07 July 2009 11:56:53 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 ... > Not sure how to deal with this in XML::LibXML. Options include: If you're concerned about efficiency, I suppose you can maintain a 3-state flag per document: - either it hasn't been validated before (and therefore has no validation info) - or it has been validated but hasn't changed since then (so the validation info is correct) - or has changed after validation - this is the only case when the next validation must clear the cached info before it starts Bye Vasek -- http://www.mangrove.cz/ Open Source integration _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs