Home
Virtual Image Printer DriverMiraplacid Publisher converts documents to images
Virtual Text Printer DriverMiraplacid Text Driver extracts text from documents
Miraplacid Data ViewerMiraplacid Data Viewer - access to internal structure of a binary file
Miraplacid Text ViewerMiraplacid Text Viewer - access to internal structure of a text file
Common:   Login | Rules of forum | Register
Management:  New topic | Close topic | Move topic | Delete topic
  

Miraplacid Forum >> Binary DOM >> RestrictionsModerator:Cerberus

Author Topic:  Restrictions
Grizzley
Member

Email
posted 2013-10-01 14:47:02 Reply -Delete

We have some problems with restrictions,
when they are in a structure that has an acceptRule, we sometimes find a LOT of restrictions cause
corruption in the way the preceding structures read data, even if the
acceptRule should have stopped the items
with restrictions from being processed.

Cerberus
Moderator

Web-page
Email
posted 2013-10-01 14:47:43 Reply -Delete

The common rule is: restrictions are intended for use mostly with primitive
types, which have no AcceptRule.
In structure, use AcceptRule inside it to stop parsing at early stage (if
only very first fields involved into checking), instead of using
unconditional structures with checking them outside. In this case, of
course, parser will pump all the data and will make calculations only after
that.
You may use restrictions with structures, say, when you have some data
structure with internal rules, and, in some specific place, you need to
check this strcture for some additional conditions.
Restrictions always makes influence on outer structure, to make it invalid
if something is wrong with inner data.

Your message:
Name, password:
Go to category:  

Technical Support

Copyright © Miraplacid, 2003 - 2015