<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Here’s how I test JavaScript output:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>$ java -cp "../../../git/X3DJSAIL/target/X3DJSAIL.jar;saxon9he.jar" net.x3djsonld.data.abox js output.js</p><p class=MsoNormal>$ jjs output.js.intermediate.js</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>abox.java is attached. You should be able to use any Java file generated from X3dToJava.xslt</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>target/X3DJSAIL.jar is from: <a href="https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary">https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary</a> clone and build as<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>sh build.sh<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You should run the java and jjs in X3DJSONLD root folder.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Note: it doesn’t work. Not quite sure what to do except complain somewhere.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Friday, September 1, 2017 11:09 AM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Subject: </b>Re: stylesheets and X3DJSAIL</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Am still trying to figure out the right way to do it, what i've tried so far didn't work. am thinking/hoping these internal stylesheet assets should be visible to any program that has access to the X3DJSAIL .jar via CLASSPATH.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for these excellent leads, I will investigate and test further.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 8/31/2017 5:47 PM, John Carlson wrote:</p><p class=MsoNormal>> Not sure, but think that:</p><p class=MsoNormal>> </p><p class=MsoNormal>> ./jsail/Core/X3DObject.java: InputStream stylesheetInputStream = getClass().getResourceAsStream(stylesheetJarPath);</p><p class=MsoNormal>> </p><p class=MsoNormal>> Should be:</p><p class=MsoNormal>> </p><p class=MsoNormal>> InputStream stylesheetInputStream = getClass().getClassLoader().getResourceAsStream(stylesheetJarPath);</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 8/31/2017 6:04 PM, John Carlson wrote:</p><p class=MsoNormal>> These three lines tell the story why you can’t find the stylesheet in the jar:</p><p class=MsoNormal>> </p><p class=MsoNormal>> find src/main/java/org/ -type f |xargs grep stylesheetJarPath</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: String stylesheetJarPath = "/stylesheets/" + ConfigurationProperties.STYLESHEET_htmlDocumentation;</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: InputStream stylesheetInputStream = getClass().getResourceAsStream(stylesheetJarPath);</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: errorNotice += "Stylesheet not found in jar: " + stylesheetJarPath + ", ";</p><p class=MsoNormal>> </p><p class=MsoNormal>> Unless I read this wrong, you are only looking for a single stylesheet in the jar, instead of a variable.</p><p class=MsoNormal>> </p><p class=MsoNormal>> These are the lines near where you need to work on:</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: String stylesheetJarPath = "/stylesheets/" + ConfigurationProperties.STYLESHEET_htmlDocumentation;</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_htmlDocumentation);</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_JSON</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_JSON);</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_JSON</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_JAVA);</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_X3DOM</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_X3DOM);</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_X3DOM</p><p class=MsoNormal>> </p><p class=MsoNormal>> src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_X3DOM);</p><p class=MsoNormal>> </p><p class=MsoNormal>> John</p><p class=MsoNormal>> </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman Naval Postgraduate School, Code USW/Br brutzman@nps.edu</p><p class=MsoNormal>Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>