[X3D-Public] announce: X3D Tidy for Scene Corrections

Don Brutzman brutzman at nps.edu
Tue Jul 8 20:14:38 PDT 2014


A new tool for X3D is now available.

X3D Tidy is an XSLT stylesheet that checks for simple errors in X3D scenes and fixes them.

X3D Tidy provides an additional form of quality assurance (QA) for X3D scenes. Authors can use X3D Tidy to fix minor errors and apply best practices for X3D scene authoring. Improved Quality Assurance (QA) helps achieve intended results in X3D scenes and metadata.

X3D Tidy takes an .x3d scene (written using the X3D XML encoding) as input, and returns a modified .x3d scene as output. Any corrections are applied in place without changing the overall formatting or layout of the original X3D scene.

Since X3dTidy.xslt is an XSLT stylesheet, the input .x3d scene must be encoded in valid XML.

  X3D Tidy is able to make the following unambiguous scene corrections.

* Modify DOCTYPE and Schema references to match <X3D> element version in scene, if match is inconsistent or insufficient
* Modify <X3D> element version to match a given value (by default this is disabled; recommended version is 3.3)
* Omit default attribute values
* Alphabetize or sort remaining attribute values in X3D Canonicalization (C14N) order
* <meta> tag: if missing insert a default title, title moved as first meta tag
* <meta> tag: add provided or suggested license
* <meta> tag: normalize dates to match suggested date format
* Fix MFString array "quotes" (such as <Text> node string array, or <ProtoInstance> fieldValue initializations)
* Remove excess embedded SFString "quotes" (such as <Viewpoint> node description field)
* Fix quoting of geoSystem values, replace deprecated values
* Expand local url array to include online addresses, prepend .x3d variants to .wrl addresses, or append .wrl variants to .x3d addresses
* <Script> node embedded source: replace javascript: prefix with ecmascript:, or insert ecmascript: prefix if missing
* For line geometry (PointSet, LineSet, IndexedLineSet, Arc2D, ArcClose2D, Circle2D): if no contained Color/ColorRGBA node, and if associated Appearance/Material emissiveColor value is default (black) or missing, then apply the diffuseColor value as emissiveColor value.

X3D Tidy does not attempt to make scene corrections which might change intended scene content or require an authoring decision.

HTML Tidy provides inspiration for this work.  Included  references describe HTML Tidy functionality in further detail.

Status:

Over 3800 .x3d scenes in the version-controlled X3D Examples archives have provided unit-testing examples for confirming the proper operation of this tool.  Automated regression testing is now an ongoing feature in archive maintenance, allowing future QA tests to be similarly tested.
http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

For the moment, X3D Tidy runs as a standalone XSLT stylesheet with various run-time options and scene overrides.  Upcoming weeks will integrate this tool into X3D-Edit authoring tool and possibly other forms.

Key links:
	http://www.web3d.org/x3d/stylesheets/X3dTidy.html
	http://www.web3d.org/x3d/stylesheets/X3dTidy.xslt

More adjustment capabilities are planned, feedback and suggestions are welcome.  Have fun with X3D!

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 mailing list