<div dir="ltr"><div><div><div><div><div><div><div>Since the idea of having a x3d document which is conforming as much as possible is attractive, I am thinking of a tool which corrects element names and attribute names to their correct case sensitive spelling. Is there such a tool ?<br></div><br>In principle I think it could work by:<br></div>1) extract all element and attribute names from the .dtd and/or schema<br></div>2) go through all elements (recursively) in (nonconforming) x3d document<br></div>2a)  normalize element name to lower-case and see if there is a corresponding normalized node name in dtd<br></div>2b) if there is replace with correct, case sensitive element name<br></div>  if not flag as unknown (or ignore, optionally eliminate)<br></div>2c) do the same for all used attribute names<br><br><div>This would work for most if not all names since they can all (most?) be distinguished in a case insensitive manner.<br><br></div><div>The tool of choice would be a xsl style sheet which may have to be generated by another stylesheet which processes the .dtd/schema. What would be other strategies (going through json) ? How would one go about this in more detail ? Perhaps the x3d-tidy.xsl style sheet is a starting point ? It looks daunting.<br><br></div><div>However, I would probably start much more straightforwardly by looking at<br><a href="http://www.web3d.org/specifications/X3dDoctypeDocumentation3.3.html">http://www.web3d.org/specifications/X3dDoctypeDocumentation3.3.html</a> and<br><a href="http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3.html">http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3.html</a><br></div><div>to assemble a list and then use unix tools such as sed/awk and such<br></div><div>to transform the x3d. What is used to generate the above documentation from the .dtd/xsd ?<br><br></div><div>Any input much appreciated,<br><br></div><div>Andreas<br></div><div><br clear="all"><br></div></div>