Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] New release (2.8) of XSV

From: Daniel Veillard <daniel@--------.--->
To: "Henry S. Thompson" <ht@---.--.--.-->
Date: 10/11/2004 5:14:00 PM
On Sun, Oct 10, 2004 at 10:57:32PM +0100, Henry S. Thompson wrote:
> Daniel Veillard <daniel@v...> writes:
> 
> > libxml2 regexps used counters since day 1 for min/maxoccurs implementation.
> > The explosion didn't look a supportable alternative to me as it opens
> > the door to trivial DoS attacks or forces to break the schemas validation
> > which is also a big problem if you consider schemas as a contract between
> > two communicating parties.
> 
> I would be very interested, as I'm sure would others, in a description
> of your algorithm.

  Well nothing fancy really. You need to add state to the regexp, in that
case the state is the number of time you went through the transition
labelled by the element name:namespace pair. Due to the single particle
rule, it means you have no need to be able to rollback the state to
enter a different transition labelled by the same name:namespace pair.
Which means the effective state required is purely linear based on the
number of counted transition you have in your regexp: one integer counter
is sufficient per such transition in the regexp runtime structure. It's
actually more automata with state that I'm using than pure regexps.
And the generated constructs for something like x{a,b} involves 
3 states (IIRC) a couple of epsilon transitions and the counted regexp,
but it's not really rocket sience either, very similar to what I was
taught in the classroom.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@v...  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 

From ht@i... Mon Oct 11 13:57:28 2004
Received: from bart.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent