[x3d-public] stylesheets and X3DJSAIL
John Carlson
yottzumm at gmail.com
Fri Sep 1 11:24:42 PDT 2017
Patch attached for X3DJSAIL creation stylesheet.
John
Sent from Mail for Windows 10
From: Don Brutzman
Sent: Friday, September 1, 2017 2:20 PM
To: John Carlson
Cc: Roy Walmsley
Subject: Re: stylesheets and X3DJSAIL
can you please to list without large attachment - thanks
On 9/1/2017 11:06 AM, John Carlson wrote:
> Don,
>
> Try this file, attached.
>
> Note that I’ve added some stylesheet code here I think. Be sure to diff to make sure you get what you want.
>
> Also, I’ve added code for outputting JavaScript files for nashorn. Untested. Should not affect anything else.
>
> Stylesheets are expected to be at lib/stylesheets in the classpath and jar.
>
> Project is here: https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary
>
> Note that I have your X3DJSAIL stylesheet in src/main/resources/lib/stylesheets. Mine is in src/main/xslt.
>
> Plus I think you should be able to unify a lot of stylesheet code. Please diff and then start combining stylesheet code at your convenience.
>
> John
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
> *From: *Don Brutzman <mailto:brutzman at nps.edu>
> *Sent: *Friday, September 1, 2017 11:09 AM
> *To: *John Carlson <mailto:yottzumm at gmail.com>
> *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>; Roy Walmsley <mailto:roy.walmsley at ntlworld.com>
> *Subject: *Re: stylesheets and X3DJSAIL
>
> 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.
>
> Thanks for these excellent leads, I will investigate and test further.
>
> On 8/31/2017 5:47 PM, John Carlson wrote:
>
> > Not sure, but think that:
>
> >
>
> > ./jsail/Core/X3DObject.java: InputStream stylesheetInputStream = getClass().getResourceAsStream(stylesheetJarPath);
>
> >
>
> > Should be:
>
> >
>
> > InputStream stylesheetInputStream = getClass().getClassLoader().getResourceAsStream(stylesheetJarPath);
>
> On 8/31/2017 6:04 PM, John Carlson wrote:
>
> > These three lines tell the story why you can’t find the stylesheet in the jar:
>
> >
>
> > find src/main/java/org/ -type f |xargs grep stylesheetJarPath
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: String stylesheetJarPath = "/stylesheets/" + ConfigurationProperties.STYLESHEET_htmlDocumentation;
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: InputStream stylesheetInputStream = getClass().getResourceAsStream(stylesheetJarPath);
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: errorNotice += "Stylesheet not found in jar: " + stylesheetJarPath + ", ";
>
> >
>
> > Unless I read this wrong, you are only looking for a single stylesheet in the jar, instead of a variable.
>
> >
>
> > These are the lines near where you need to work on:
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: String stylesheetJarPath = "/stylesheets/" + ConfigurationProperties.STYLESHEET_htmlDocumentation;
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_htmlDocumentation);
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_JSON
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_JSON);
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_JSON
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_JAVA);
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_X3DOM
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_X3DOM);
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: * @see ConfigurationProperties#STYLESHEET_X3DOM
>
> >
>
> > src/main/java/org/web3d/x3d/jsail/Core/X3DObject.java: File stylesheetFile = new File("lib/stylesheets/", ConfigurationProperties.STYLESHEET_X3DOM);
>
> >
>
> > John
>
> >
>
> 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
>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170901/bba530fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CreateX3DJSAI.patch
Type: application/octet-stream
Size: 13034 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170901/bba530fb/attachment-0001.obj>
More information about the x3d-public
mailing list