XSLT, Depends on how I start Oxygen
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
XSLT, Depends on how I start Oxygen
I'm still on Oxygen 8.1 running on XP sp2.
I have an XSLT that uses:
because I want to run the transformation against a bunch of XML files, not just one.
If I open Oxygen by double clicking on the XSL file or on the Oxygen Project XML file, everything works just fine.
However, if I open Oxygen from the shortcut, and even if I re-open the Project, running the XSL I get 2 errors:
Why does it make a difference as to how Oxygen is opened whether or not the XSLT executes correctly?
I have an XSLT that uses:
Code: Select all
<xsl:variable name="subtreeCmdsource" select="collection('/mphare/Development/structured-fm/XSLT/source/?select=*.xml')"/>
If I open Oxygen by double clicking on the XSL file or on the Oxygen Project XML file, everything works just fine.
However, if I open Oxygen from the shortcut, and even if I re-open the Project, running the XSL I get 2 errors:
Code: Select all
F The file or directory file:/mphare/Development/structured-fm/XSLT/source/ does not exist
E The file or directory file:/mphare/Development/structured-fm/XSLT/source/ does not exist
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSLT, Depends on how I start Oxygen
Post by sorin_ristache »
Hello,
I cannot reproduce the problem with oXygen version 8.2. Do you get the same error with version 8.2? The same license key that you use with version 8.1 is valid for version 8.2. If you get the same error please post the full file path of the XSLT stylesheet and of the folder /mphare/Development/structured-fm/XSLT/source.
Regards,
Sorin
I cannot reproduce the problem with oXygen version 8.2. Do you get the same error with version 8.2? The same license key that you use with version 8.1 is valid for version 8.2. If you get the same error please post the full file path of the XSLT stylesheet and of the folder /mphare/Development/structured-fm/XSLT/source.
Regards,
Sorin
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
Thanks for the heads up about 8.2
Same problem, but I've narrowed it down to drive letter.
My install is on the C: drive, I work on the D: drive.
I changed the shortcut to Oxygen 8.2 to make the D: drive the "Start In" drive and it works.
So, it's probably not really an issue.
Thanks!
Same problem, but I've narrowed it down to drive letter.
My install is on the C: drive, I work on the D: drive.
I changed the shortcut to Oxygen 8.2 to make the D: drive the "Start In" drive and it works.
So, it's probably not really an issue.
Thanks!
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
Spoke too soon..
Now, with 8.2, it's doesn't work at all, even if I change the shortcut.
So, I'm backing back to R8.1.
I'm sure it has something to do with the drive letters being different.
Now, with 8.2, it's doesn't work at all, even if I change the shortcut.
So, I'm backing back to R8.1.
I'm sure it has something to do with the drive letters being different.
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
Here's the stylesheet:
If I move the source files and directory hierarchy to the C Drive, the problem goes away.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--
=====================================================
TL1Stats.xsl
- - - - - - - - - - - - - - - - - - - -
This XSLT searches through the NMIS gathering NMI Statistics
- - - - - - - - - - - - - - - - - - - -
copyright 2007 Fujitsu Network Communications
=====================================================
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!-- Begin Output Processing -->
<xsl:preserve-space elements="*"/>
<!-- Since this going to be imported into Framemaker, we will output in XML -->
<xsl:output method="xml"/>
<!--
-->
<xsl:template match="/">
<!--
-->
<xsl:variable name="subtreeCmdsource"
select="collection('/mphare/Development/structured-fm/XSLT/source/?select=*.xml')"/>
<!--
-->
<xsl:text>
</xsl:text>
<Section>
<Appendix>
<Head>Task Sets</Head>
<Para/>
<xsl:text>
</xsl:text>
<table colsep="1" frame="all" rowsep="1" tabstyle="FormatA">
<xsl:text>
</xsl:text>
<title>Processed Files</title>
<tgroup colsep="1" cols="2" rowsep="1">
<xsl:text>
</xsl:text>
<colspec colname="1" colnum="1" colwidth="1.0in"/>
<xsl:text>
</xsl:text>
<colspec colname="2" colnum="2" colwidth="4.0in"/>
<xsl:text>
</xsl:text>
<thead>
<xsl:text>
</xsl:text>
<row rowsep="1">
<xsl:text>
</xsl:text>
<entry colname="1" cellFmt="Small">ID</entry>
<entry colname="2" cellFmt="Small">Filename</entry>
<xsl:text>
</xsl:text>
</row>
<xsl:text>
</xsl:text>
</thead>
<xsl:text>
</xsl:text>
<tbody>
<!--
Dump the names of all the files we are processing during this run
-->
<xsl:call-template name="fileNames">
<xsl:with-param name="param1" select="$subtreeCmdsource"/>
</xsl:call-template>
</tbody>
</tgroup>
</table>
</Appendix>
</Section>
</xsl:template>
<!--
======================================================================
Start of Templates
======================================================================
-->
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Template:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Template:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xsl:template name="fileNames">
<xsl:param name="param1"/>
<xsl:for-each select="$param1/.">
<!--
We are going to output the filename as:
# : filename
where # is an enumeration of the file
and filename is the name of the file
position() outputs the enumeration
-->
<row>
<entry colname="1" cellFmt="Small">
<xsl:value-of select="position()"/>
</entry>
<!--
for the filename, tokenize the current document uri using
a backslash as the delimeter.
Then, the last() node will be just the filename
-->
<entry colname="2" cellFmt="Small">
<xsl:value-of select="tokenize(document-uri(.), '/')[last()]"/>
</entry>
<xsl:text>
</xsl:text>
</row>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
If I move the source files and directory hierarchy to the C Drive, the problem goes away.
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
Hi,
Any ideas on this? 8.2 completely broke my XSLT processing. I'm forced to back rev myself to 8.1 so I can continue working.
Any ideas on this? 8.2 completely broke my XSLT processing. I'm forced to back rev myself to 8.1 so I can continue working.
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSLT, Depends on how I start Oxygen
Post by sorin_ristache »
You installed oXygen on the drive C: but your XML files (/mphare/Development/structured-fm/...) are located on drive D:. In case you start oXygen from the start menu the start driver is C: so your relative path (/mphare/Development/structured-fm/XSLT/source) is resolved relative to C:. The error is correctly reported in this case.
In case you start oXygen by double clicking on the XSLT from D: the start driver should be D: so the files should be read correctly from D:\mphare\Development\structured-fm\XSLT\source\*.xml. We will investigate this issue.
Until we fix the problem please pass a URL parameter to the collection() function, that is:
In this case the start drive does not matter.
Regards,
Sorin
In case you start oXygen by double clicking on the XSLT from D: the start driver should be D: so the files should be read correctly from D:\mphare\Development\structured-fm\XSLT\source\*.xml. We will investigate this issue.
Until we fix the problem please pass a URL parameter to the collection() function, that is:
Code: Select all
file:///D:/mphare/Development/structured-fm/XSLT/source
Regards,
Sorin
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
Thanks.
That works in 8.1 but not in 8.2
The problem with using the drive letter is I ultimately run the transformations from cygwin bash scripts. The drive letter causes problems in that case.
But, thanks for getting back to me.
I'll stick with 8.1 for the time being.
Would 9.1 have this same issue?
That works in 8.1 but not in 8.2
The problem with using the drive letter is I ultimately run the transformations from cygwin bash scripts. The drive letter causes problems in that case.
But, thanks for getting back to me.
I'll stick with 8.1 for the time being.
Would 9.1 have this same issue?
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSLT, Depends on how I start Oxygen
Post by sorin_ristache »
It does not matter how you run the stylesheet. If you specify a URL as parameter for the XSLT 2.0 collection() function (file:///D:/mphare/Development/...) the XML collection files should be located correctly.
Yes, version 9.1 has the same problem. We will look into the start drive issue.
Regards,
Sorin
Yes, version 9.1 has the same problem. We will look into the start drive issue.
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSLT, Depends on how I start Oxygen
Post by sorin_ristache »
I figured out why your files specified by a relative location are not found. On Windows the start directory is the installation directory (C:\Program Files\Oxygen XML Editor <version-number>) both when oXygen is started from the start menu and when it is started by double clicking on a file located on the D: drive. This is the start directory of the Java virtual machine that Windows sets to the executable file that starts oXygen and it cannot be changed. It is not an oXygen bug. You can see the path of the start directory in the property user.dir in the About dialog opened from menu Help -> About, the System properties tab of the dialog.
For example if you start the Java virtual machine that runs oXygen from a folder on the D: drive with a command like the one from [oXygen-install-dir]/oxygen.bat then the relative path is resolved as you need for your stylesheet.
Regards,
Sorin
For example if you start the Java virtual machine that runs oXygen from a folder on the D: drive with a command like the one from [oXygen-install-dir]/oxygen.bat then the relative path is resolved as you need for your stylesheet.
Regards,
Sorin
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
With 8.1 I can start Oxygen by double-clicking on the XSL file on the D: drive or, I can change the 'Start In' directory in the Oxygen shortcut, and the relative path finds the files on the D: drive.
With 8.2 it doesn't. So something changed between 8.1 and 8.2.
Whether it's a bug or not, that's your call.
Myself, I like the 8.1 behaviour better.
With 8.2 it doesn't. So something changed between 8.1 and 8.2.
Whether it's a bug or not, that's your call.
Myself, I like the 8.1 behaviour better.
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 71
- Joined: Fri Apr 30, 2004 8:00 pm
- Location: Texas
Re: XSLT, Depends on how I start Oxygen
It occurs to me that maybe upgrading my Saxon might change how this works.
Is it possible to ad Saxon9 to Oxygen 8.2?
If so, are their guidelines or instructions on how to do it?
Thanks,
- m
Is it possible to ad Saxon9 to Oxygen 8.2?
If so, are their guidelines or instructions on how to do it?
Thanks,
- m
--------------------------
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
- mike
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSLT, Depends on how I start Oxygen
Post by sorin_ristache »
Hello,
I think upgrading the Saxon version does not change how the start directory is set to a Windows process. Anyway replacing the Saxon version means replacing the jar files of the old Saxon version with the jar files of the new version in the [oXygen-install-dir]/lib directory. If the new version of Saxon introduced API changes that were taken into consideration only in a later version of oXygen (released after the new version of Saxon) then the transformations may throw a NoSuchMethodError or a NoClassDefFoundError in the Editor perspective or in the Debugger perspective of oXygen.
Regards,
Sorin
I think upgrading the Saxon version does not change how the start directory is set to a Windows process. Anyway replacing the Saxon version means replacing the jar files of the old Saxon version with the jar files of the new version in the [oXygen-install-dir]/lib directory. If the new version of Saxon introduced API changes that were taken into consideration only in a later version of oXygen (released after the new version of Saxon) then the transformations may throw a NoSuchMethodError or a NoClassDefFoundError in the Editor perspective or in the Debugger perspective of oXygen.
Regards,
Sorin
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XSLT, Depends on how I start Oxygen
Saxon 9 added API changes and therefore overwriting Saxon 8 libraries from oXygen 8 will cause unexpected behavior.
However, you can configure Saxon 9 as an external XSLT processor in oXygen 8 and use it in your transformation scenarios.
Best Regards,
George
However, you can configure Saxon 9 as an external XSLT processor in oXygen 8 and use it in your transformation scenarios.
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service