SPFE Open Toolkit Alpha 1

The first alpha release of the SPFE Open Toolkit is now available. This is a very preliminary release, more likely to be of interest to XML geeks than to authors. A lot of stuff is not here or is not working, but the basic configuration and build system is working, and demonstrates the modularity of the system. Soft linking is also working. There is minimal documentation, and what there is has to be built by running the SPFE build on the source files, per the instructions below.

Download for Windows: spfe.alpha1.20120422.zip

Download for Linux: spfe.alpha1.20120422.tar.gz

To make it run:

  1. Unpack the archive to a suitable location.
  2. Create an environment variable SPFEOT_HOME and set it to the location of the spfe-ot directory. For example: SPFEOT_HOME=/home/yourname/spfe/spfe-ot
  3. Add the spfe-ot directory to your path.
  4. If not already installed, install Java.
  5. If not already installed, install ANT and add it to your path.

To build the SPFE docs:

  1. Go to the directory spfe/spfe-docs/build.
  2. Enter: spfe spfe-docs-config.xml draft. The build will create a directory spfebuild in your home directory. The SPFE docs will be in /spfebuild/spfe-docs/output.

If it does not work for you, use the comments to ask for help. Ditto if you can’t figure out what it does. Ditto if you would like to contribute to the development.

More documentation will be coming soon.

Tags:

{ 19 comments to read ... please submit one more! }

  1. The zip package appears to be corrupted. It’s only about 8 KB. I had better luck with the “Linux” package.

    There was apparently some XSLT 2.0 stuff that Xalan couldn’t handle, so I switched to Saxon 9.

    Then I got a spfe-docs directory OK, but no output subfolder. Here’s the command prompt output:

    Buildfile: C:UsersJoeAppDataLocalTempspfetemp15971.xml

    draft:
    [echo] Running config.xsl on /C:/spfe/spfe-docs/build/development/spfe-build-config.xml
    [xslt] Processing C:spfespfe-docsbuilddevelopmentspfe-build-config.xml to C:UsersJoeAppDataLocalTempspfe-docs1.xml
    [xslt] Loading stylesheet C:spfespfe-otscriptsconfigconfig.xsl
    [xslt] Warning: external object model net.sf.saxon.dom.DOMEnvelope has been loaded, but is not an instance of net.sf.saxon.om.ExternalObjectModel
    [xslt] Warning: external object model net.sf.saxon.dom.DOMObjectModel has been loaded, but is not an instance of net.sf.saxon.om.ExternalObjectModel
    [xslt] Loading config file: file:/C:/spfe/spfe-docs/build/development/spfe-build-config.xml
    [xslt] Loading config file: file:/C:/spfe/spfe-docs/build/spfe-docs-config.xml
    [xslt] There is no doc-set: true
    [xslt] Generating config file: file:///C:/Users/Joe/spfebuild/spfe-docs/development/config/spfe-config.xml

    -recorder:
    [echo] Logging to: C:/Users/Joe/spfebuild/spfe-docs/development/logs/spfe-docs.txt

    -init:

    -check-last-build-status:
    [echo] Last build failed. Cleaning up.
    [echo] Beginning build of spfe-docs

    draft:

    -draft-flag:

    -is-draft:

    -force-clean:

    -get.source-files.topics:

    -get.source-files.text-objects:

    -get.source-files.fragments:

    -get.source-files.strings:

    -current.synthesis:

    –build.synthesis:
    [xslt] Processing C:UsersJoespfebuildspfe-docsdevelopmentconfigspfe-config.xml to C:UsersJoespfebuildspfe-docsdevelopmenttempsynthesisspfe.synthesis.xml
    [xslt] Loading stylesheet C:UsersJoespfebuildspfe-docsdevelopmentspfe.synthesis.xsl
    [xslt] Failed to process C:UsersJoespfebuildspfe-docsdevelopmentconfigspfe-config.xml

  2. Hi Joe

    I’m travelling today. Will look at this when I get back.

  3. Thanks, Mark. Well, I found that the extracted files had a lot of truncated filenames. I extracted the .tar.gz archive again with another tool and things were better. And the SPFE-OT now seems to be using its own copy of Saxon 9, without me needing to add it to my Path.

    What I did need to add to the Path to use your exact command was:
    %SPFEOT_HOME%spfeot
    Might be worth mentioning this in the instructions.

    Another thing that tripped me up was that I hadn’t installed the necessary ANT dependencies. I ran “ant -f fetch.xml -Ddest=system” and that fixed it.

    I’m stuck on another error at the moment:

    C:toolsspfespfe-docsbuild>spfe spfe-docs-config.xml draft
    Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/saxon/Transfor
    m
    Caused by: java.lang.ClassNotFoundException: net.sf.saxon.Transform
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: net.sf.saxon.Transform. Program will exit.
    Buildfile: C:UsersJOE_PA~1AppDataLocalTempspfetemp17146.xml does not exist
    !
    Build failed

  4. Joe,

    I have updated the .zip version. There is actually no difference between the two versions other than the archive method. However, the original .zip was created on Linux and I have replaced it with one built on Windows.

    I suspect the build problem goes back to the Saxon warnings:

    [xslt] Warning: external object model net.sf.saxon.dom.DOMEnvelope has been loaded, but is not an instance of net.sf.saxon.om.ExternalObjectModel
    [xslt] Warning: external object model net.sf.saxon.dom.DOMObjectModel has been loaded, but is not an instance of net.sf.saxon.om.ExternalObjectModel

    I have not seen these warnings before, and Google is not immediately helpful in diagnosing them.
    Since Saxon is included in the download, my best guess on the cause of those warnings is that either there was some corruption in the download itself, or some issue with Java on your system. If you don’t mind, could you download the Windows version and try again?

  5. Thanks, Mark. Indeed your guess about corruption was right – many of the filenames had been truncated by the tool I used to extract the archive. Another tool worked better, but anyway the current version I’m using is the Windows one.

    I got it working OK on my Vista machine after two further steps. I needed to get the “optional” ANT dependencies as described in step 5 here:
    http://ant.apache.org/manual/install.html

    And, oddly, I still needed to add the SPFE-OT’s copy of Saxon9he.jar to my classpath.

    So I’ve generated the docs OK and I’m going to start reading them now.

    I still haven’t been able to get the SPFE-OT working on my Windows 7 machine though. I’ve tried various things with the classpath and also tried standalone Saxon downloads, but I always get this error:

    C:toolsspfespfe-docsbuild>spfe spfe-docs-config.xml draft
    Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/saxon/Transfor
    m
    Caused by: java.lang.ClassNotFoundException: net.sf.saxon.Transform
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: net.sf.saxon.Transform. Program will exit.
    Buildfile: C:UsersJOE_PA~1AppDataLocalTempspfetemp26637.xml does not exist
    !
    Build failed

    Any thoughts on this? Extensive Googling didn’t turn up much – it appears that Saxon 9 isn’t being used correctly but I don’t know any more than that.

    • Hi Joe,

      I think you had a later comment which for some reason ended up in the spam filter. I saw it in the spam list, glanced at it, and clicked what I thought was the button to approve it, but now it isn’t showing up anywhere, so I suspect that I pressed the wrong button. Anyway, I think it said that the classpath problem had gone away. If so, great.

      I have checked through the code to see if I missed a dependency somewhere, but if I did, I can’t find it. I suspect that when I created the .zip version under Linux that the file paths got messed up either on the Linux side, or when the file was unzipped on Windows. Hopefully the .zip made on Windows is working correctly now.

      The other possibility, according to what I have read, is that some versions of Ant are known to have been flaky with regards to the handling of classpaths, so possibly your version of Ant is different from mine (I’m running 1.8.2). This leads me to think that the SPFE OT should probably include a version of ANT that is known to work.

      Thanks for persevering. The joys of alpha software!

  6. Found a copy of Joe’s missing comment in my email inbox. Apparently I managed to approve it and then immediately delete it. Here it is:

    Thanks, Mark. Well, I found that the extracted files had a lot of truncated filenames. I extracted the .tar.gz archive again with another tool and things were better. And the SPFE-OT now seems to be using its own copy of Saxon 9, without me needing to add it to my Path.

    What I did need to add to the Path to use your exact command was:
    %SPFEOT_HOME%spfeot
    Might be worth mentioning this in the instructions.

    Another thing that tripped me up was that I hadn’t installed the necessary ANT dependencies. I ran “ant -f fetch.xml -Ddest=system” and that fixed it.

    I’m stuck on another error at the moment:

    C:toolsspfespfe-docsbuild>spfe spfe-docs-config.xml draft
    Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/saxon/Transfor
    m
    Caused by: java.lang.ClassNotFoundException: net.sf.saxon.Transform
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: net.sf.saxon.Transform. Program will exit.
    Buildfile: C:UsersJOE_PA~1AppDataLocalTempspfetemp17146.xml does not exist
    !
    Build failed

    • I think wordpress is killing some characters in the error message strings, which makes things a little harder to read. I think I need to set up a forum or mailing list for SPFE OT discussions sooner rather than later.

      Is “What I did need to add to the Path to use your exact command was:
      %SPFEOT_HOME%spfeot” different from the existing step 3 above: “Add the spfe-ot directory to your path.”?

      The error you report looks like a problem finding Saxon, and since it comes from the spfe batch file, it can’t be an issue with ANT’s handling of class paths. It makes me wonder if you have SPFEOT_HOME set correctly.

  7. Thanks for looking into this, Mark. SPFEOT_HOME was indeed set incorrectly on one machine. I’m now able to build the SPFE docs successfully on both machines.

    By the time I posted on the 28th at 01:53, I’d re-read your instructions and realized that you’d mentioned the path in step 3. I now have %SPFEOT_HOME% in the path on both machines, and because the SPFEOT_HOME variable is now set correctly, it’s working fine.

    I’m on ANT 1.8.3, by the way – no problems apart from an initial error before I’d grabbed the dependencies with fetch.xml.

    Yes, it would be good to have a forum or mailing list.

  8. Hi Mark,

    Happy to report that installing and building the sample docs on Ubuntu was pretty straight-forward. Only one little wrinkle:

    The link from spfe.sh to spfe needed to be deleted and redone. It was pointing to a location local to your environment (/home/mbaker/dropbox …).

    Other than that, very simple to get running. I’ll let you know if I come across any other issues.

    Ron

    • Thanks Ron. I’m a linux newbie, so thanks for catching that. Now to see if there is a way to create a link with a relative path.

  9. Pamela Clark

    Mark,

    Can you provide a brief description of what I would be able to do with this alpha tool kit? Very curious about whether an author can make use of it, or would need the XML tools person to make this useful. Thanks.

    • Hi Pamela,

      Pretty much all you can do with the alpha toolkit is build the SPFE docs. There are no instructions for authors as yet, and some of the capabilities that authors would expect are not yet working. The main purpose of Alpha 1 is to let people who are interested in the configuration and build process get an idea of how it works. Definitely for tools wonks rather than authors at this stage.

  10. Pablo Varela

    Hi Mark,
    Is this project up on any collaborative project site? Are you interested in some help?

    • Hi Pablo,

      Yes, the project is on GitHub at https://github.com/mbakeranalecta/spfe-open-toolkit. Right now, the latest in master is simply my last checkin — there is no “stable” version as distinct from the “development” version. That is something I need to fix fairly soon.

      And yes, I am definitely interested in some help. I probably need to do some work on better defining project goals, to make it easier for people to help. But please feel free to jump in, and to ask any questions you may have. I would really appreciate the help.

      Mark

  11. Hi Mark,
    I successfully deployed spfe-alpha1 and built the SPFE documentation on Ubuntu.
    The only tweaks I needed were to set variables $CLASSPATH pointing SPFE-bundled saxon9he.jar and $SPFEOT_HOME pointing at my SPFE directory.
    My ant version is 1.7.1.

    • Hi Pablo,

      Thanks for this. I have now set up a website for the SPFE Open Toolkit at http://www.spfeopentoolkit.org. I have installed a forum and a project tracking application. I can set you up with a login on the project tracker if you like. I think you should be able to sign up for the forum yourself.

      I have made some progress on setting up projects and tasks in the project tracker, but much remains to do.

      I also need to figure out what needs to go into an alpha 2 release, as the alpha 1 is pretty primitive and should be replaced soon.

  12. Lief Erickson

    I downloaded the SPFE OT. Is spfe.alpha1.20120422.zip still the latest file for Windows?

    • Hi Lief,

      The latest version of the SPFE OT is the one on GitHub. There is a link to it from the spfeopentoolkit.org site. If you are comfortable working with Git, then cloning from GitHub is the easiest way to get the current version. If not, let me know and I will make a .zip available for you to use. Do keep in mind that the toolkit is currently in development, so it has raw edges.

      Mark

{ 0 Pingbacks/Trackbacks }