[X3D-Public] new X3D quality assurance tests using regular expressions (regexes)
brutzman at nps.edu
Mon Apr 2 18:14:22 PDT 2012
I'm happy to report that X3D regex tests have successfully joined
last week's X3D schematron tests, and are now avialable in today's
update release of X3D-Edit.
Example input and check-box output follows. Can you spot the flaws yourself?
[lines 1..20 omitted]
<Transform rotation='0.01.0 0.0 3.0'>
<Material DEF='LightBlue' diffuseColor='0.1 0.5 01'/>
<ImageTexture url='"earth-topo.png" "earth-topo.jpg" '/>
Performing X3D regular expression (regex) values check...
Found 1 malformed float groups:
- in line 21 column 26, '0.01.0
Found 1 leading-zero match:
- in line 25 column 59, 01'
Refined regular expressions:
<property name="regexGarbledFloats" value="(\s|,|"|')(\+|-)?\d*\.\d+(E|e)?(\+|-)?\.\d*(\s|,|"|')"/>
<property name="regexLeadingZeroes" value="(\s|,|"|')(\+|-)?0\d+(\.\d*)?(E|e)?(\+|-)?(\.\d*)?(\s|,|"|')"/>
<!-- reference: X3dValuesRegexChecker.java
Work in progress: deploying an X3D Validation Server, hopefully
available for beta testing later this week.
On 3/19/2012 11:44 PM, Don Brutzman wrote:
> Difficult flaws to detect in .x3d scenes include floating point
> arrays that are garbled by missing spaces, or numbers that have
> extraneous leading zeroes. These can cause bad rendering problems.
> Browsers are inconsistent about detecting such errors, and often
> do not provide diagnostics that such problems exist.
> Regular expressions provide a way to find string combinations that
> meet a certain pattern. This can provide a powerful diagnostic tool.
> Terry Norbraten and I have worked up some regular expressions to detect
> these two problems. The tests are implemented in the build.xml files
> that are used to prepare the many X3D scenes in our example archives.
> Suggestions for other difficult-to-detect scene pathologies are welcome.
> Further detail on regular expressions can be found at
> The X3D working group is dedicated alternating weekly teleconferences
> to discuss X3D authoring issues. We hope to identify best practices,
> help fix problems, and give browser companies a prioritized list of
> common browser bugs and inconsistencies. Fixing errors in content
> is a big step towards ensuring that the bug isn't in the scene itself.
all the best, Don
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
More information about the X3D-Public