[x3d-public] jupyter notebook; X3DOM syntax for including X3D within HTML/XHTML

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Fri May 31 03:14:05 PDT 2019

thanks for great progress.

On 5/28/2019 12:12 PM, Andreas Plesch wrote:
> - x3dom has a problem with generated X3D outside of an Inline because
> the serialized XML output uses self-closing tags such as <Material />
> which is not HTML compatible.

HTML allows singleton elements, i.e. self-closing tags.

Similarly, element CamelCaseElementNames are legal, so we should not have to rename <Material/> to <material></material> simply because of similarity to another language's naming patterns.

i think root of this problem likely lies in how X3DOM uses the accompanying DOM libraries - not sure of those details.

Note that I got *all* of the X_ITE and X3DOM examples to work with HTML by assigning scenes to .html and .xhtml respectively.



> So the suggestion would be to provide a method, say
> x3d.toStringX3DClosingTags(), which generates explicit closing tags:
> <Material></Material>

I don't think it is good to propagate a side-effect fix (which encourages mysterious improper practices and hides path towards fixes).

Rather it is more desirable to isolate and fix the actual problem.  If someone can figure out why X3DOM runs differently when included within .xhtml and .html pages, that may reveal whatever idiosyncrasy is actually occurring.

Finally we want to match the same patterns in X_ITE and X3DOM so that choice of player is independent of source-model syntax when using X3D version 4.  So this is a worthy mismatch to figure out and fix.  Hopefully we can get closer to sorting things out fully.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Meanwhile: found and fixed several errors in online X3DOM .xhtml examples:
- corrected url to match changed release address:

- fixed bug in X3dToX3dom.xslt code logic in order to include function toggleFullscreen ()

- using XHTML Transitional (vice Strict) DTD in order for anchor target attribute to pass validation

X3dToX3dom.xslt stylesheet correction checked in, X3DOM example pages updated and uploaded.  Having fun with X3DOM!  8)

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