[x3d-public] X3DJSAIL TypeScript version (but there were 8 errors generatingit Iam investigating) generated with JSweet -- PATCH!

Don Brutzman brutzman at nps.edu
Sun Apr 23 15:31:42 PDT 2017


On 4/19/2017 6:11 PM, yottzumm at gmail.com wrote:
> Here’s the patch to CreateX3dSceneAccessInterfaceJava.xslt.  Please apply at least the close brace patch, I spent a year finding that one again.  It really interferes with the build process in both netbeans and eclipse.
> 
> John

OK done.  details follow.

> 32c32
> < 	<xsl:variable name="saiPackageDirectorySource">       <xsl:text>java/src/org/web3d/x3d/sai</xsl:text></xsl:variable>
> ---
>> 	<xsl:variable name="saiPackageDirectorySource">       <xsl:text>src/main/java/org/web3d/x3d/sai</xsl:text></xsl:variable>
> 37c37
> < 	<xsl:variable name="concretePackageDirectorySource">  <xsl:text>java/src/org/web3d/x3d/jsail</xsl:text></xsl:variable>
> ---
>> 	<xsl:variable name="concretePackageDirectorySource">  <xsl:text>src/main/java/org/web3d/x3d/jsail</xsl:text></xsl:variable>
> 10941a10942

those were tricky.  had to modify the correct build file so that results would go in the correct location. added a stylesheet parameter targetDirectory to handle that, default is empty path.

> 10944,10947c10945,10948
> < 			<!--xsl:if test="($wrapClassBrackets)"-->
> < 				<xsl:text>}</xsl:text>
> < 				<xsl:text>
</xsl:text>
> < 			<!--/xsl:if-->
> ---
>> 			<xsl:if test="($wrapClassBrackets)">
>> 				<xsl:text  disable-output-escaping="yes">}</xsl:text>
>> 				<xsl:text  disable-output-escaping="yes">
</xsl:text>
>> 			</xsl:if>

The problem there seems to be that the if test is commented out... not the case in the current build.

I did a bunch of other refactoring work with method="text" vice method="html" to avoid saxon line-breaks.  This changed some other anchor links in the javadoc; overall a very good thing and more consistent throughout.

You don't need disable-output-escaping="yes" there for the close brace } and line feed 
 to work OK.  Please holler if you think otherwise.

As for the rest, getting explicit about external packages is always a good thing to do.  To make sure that everything was handled with fully elaborated packages, I commented out all of the import org.w3c.dom.* entries.

So it looks like all of these requests are now integrated.  Tests pass, checked in, will deploy that and a few other things tonight.

> 12436c12437
> < 	 * @see X3DLoaderObject#toX3dObjectTree(Node)
> ---
>> 	 * @see X3DLoaderObject#toX3dObjectTree(org.w3c.dom.Node)
> 23440c23441
> < 	public String toStringX3D(Node node) {
> ---
>> 	public String toStringX3D(org.w3c.dom.Node node) {
> 23449c23450
> < 	private String toStringX3D(Node node, String indent)
> ---
>> 	private String toStringX3D(org.w3c.dom.Node node, String indent)
> 23456c23457
> < 			case Node.DOCUMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.DOCUMENT_NODE:
> 23458c23459
> < 				NodeList childNodeList = node.getChildNodes();	// recurse on children
> ---
>> 				org.w3c.dom.NodeList childNodeList = node.getChildNodes();	// recurse on children
> 23468c23469
> < 			case Node.DOCUMENT_TYPE_NODE:
> ---
>> 			case org.w3c.dom.Node.DOCUMENT_TYPE_NODE:
> 23509c23510
> < 			case Node.ELEMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.ELEMENT_NODE:
> 23517c23518
> < 					Node current = attributes.item(i);
> ---
>> 					org.w3c.dom.Node current = attributes.item(i);
> 23522c23523
> < 				NodeList children = node.getChildNodes();
> ---
>> 				org.w3c.dom.NodeList children = node.getChildNodes();
> 23525c23526
> < 					if (children.item(i).getNodeType() != Node.TEXT_NODE)
> ---
>> 					if (children.item(i).getNodeType() != org.w3c.dom.Node.TEXT_NODE)
> 23549c23550
> < 			case Node.TEXT_NODE:
> ---
>> 			case org.w3c.dom.Node.TEXT_NODE:
> 23554c23555
> < 			case Node.CDATA_SECTION_NODE:
> ---
>> 			case org.w3c.dom.Node.CDATA_SECTION_NODE:
> 23560c23561
> < 			case Node.COMMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.COMMENT_NODE:
> 23564c23565
> < 			case Node.PROCESSING_INSTRUCTION_NODE:
> ---
>> 			case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:
> 23570c23571
> < 			case Node.ENTITY_REFERENCE_NODE:
> ---
>> 			case org.w3c.dom.Node.ENTITY_REFERENCE_NODE:
> 23585c23586
> < 	public X3DConcreteElement toX3dObjectTree(Node node)
> ---
>> 	public X3DConcreteElement toX3dObjectTree(org.w3c.dom.Node node)
> 23600c23601
> < 	public X3DConcreteElement toX3dObjectTree(Node node, X3DConcreteElement parentElement)
> ---
>> 	public X3DConcreteElement toX3dObjectTree(org.w3c.dom.Node node, X3DConcreteElement parentElement)
> 23610c23611
> < 			case Node.DOCUMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.DOCUMENT_NODE:
> 23612c23613
> < 				NodeList childNodeList = node.getChildNodes();	// recurse on children
> ---
>> 				org.w3c.dom.NodeList childNodeList = node.getChildNodes();	// recurse on children
> 23624c23625
> < 			case Node.DOCUMENT_TYPE_NODE:
> ---
>> 			case org.w3c.dom.Node.DOCUMENT_TYPE_NODE:
> 23638c23639
> < 			case Node.ELEMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.ELEMENT_NODE:
> 23691c23692
> < 				NodeList children = node.getChildNodes();
> ---
>> 				org.w3c.dom.NodeList children = node.getChildNodes();
> 23694c23695
> < 					if (children.item(i).getNodeType() != Node.TEXT_NODE)
> ---
>> 					if (children.item(i).getNodeType() != org.w3c.dom.Node.TEXT_NODE)
> 23707c23708
> < 						if (children.item(i).getNodeType() == Node.TEXT_NODE)
> ---
>> 						if (children.item(i).getNodeType() == org.w3c.dom.Node.TEXT_NODE)
> 23781c23782
> < 							// CommentsBlock handled by case Node.COMMENT_NODE
> ---
>> 							// CommentsBlock handled by case org.w3c.dom.Node.COMMENT_NODE
> 23965c23966
> < 					Node currentAttributeNode = attributes.item(i);
> ---
>> 					org.w3c.dom.Node currentAttributeNode = attributes.item(i);
> 24102c24103
> < 			case Node.TEXT_NODE:
> ---
>> 			case org.w3c.dom.Node.TEXT_NODE:
> 24113c24114
> < 			case Node.CDATA_SECTION_NODE:
> ---
>> 			case org.w3c.dom.Node.CDATA_SECTION_NODE:
> 24117c24118
> < 			case Node.COMMENT_NODE:
> ---
>> 			case org.w3c.dom.Node.COMMENT_NODE:
> 24131c24132
> < 			case Node.PROCESSING_INSTRUCTION_NODE:
> ---
>> 			case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:
> 24135c24136
> < 			case Node.ENTITY_REFERENCE_NODE:
> ---
>> 			case org.w3c.dom.Node.ENTITY_REFERENCE_NODE:
> 24140c24141
> < //		for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling())
> ---
>> //		for (org.w3c.dom.Node child = node.getFirstChild(); child != null; child = child.getNextSibling())


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