Strange xsl:variable problem
Oxygen general issues.
-
- Posts: 14
- Joined: Wed Sep 20, 2006 7:07 pm
Strange xsl:variable problem
Post by heavydawson »
I have a piece of pretty standard xslt that is causing me problems.
When I debug this code, I can see in the debugger that the line-rate variable has been set correctly, while the dave variable exists but it not set. The lines come directly after each other in the stylesheet. How can it be that one functions correctly and the other not, when the xpath expression is the exact same?
The code is stylesheet is defined as xslt 2.0, and I'm using saxon 8, and my jre is 6.0
It may or may not be related but just today Oxygen started throwing an error on load
However, it continues to load fine. Can anyone help me?
Code: Select all
<xsl:variable name="line-rate" select="round-half-to-even(@line-rate * 100, 2)"/>
<xsl:variable name="dave" select="round-half-to-even(@line-rate * 100, 2)"/>
The code is stylesheet is defined as xslt 2.0, and I'm using saxon 8, and my jre is 6.0
It may or may not be related but just today Oxygen started throwing an error on load
Code: Select all
[ AWT-EventQueue-0 ] - java.lang.NullPointerException
java.lang.NullPointerException
at ro.sync.ui.application.ApplicationDialog.ʗ(Unknown Source)
at ro.sync.ui.application.ApplicationDialog.setVisible(Unknown Source)
at ro.sync.I.K.ل(Unknown Source)
at ro.sync.I.K$3.run(Unknown Source)
at ro.sync.ui.H$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
-
- Posts: 14
- Joined: Wed Sep 20, 2006 7:07 pm
Post by heavydawson »
The problem seems to have resolved itself. Sorry if anyone spent any time looking for a solution!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Strange xsl:variable problem
Post by sorin_ristache »
No, they are not related. The NullPointerException error is caused by a bug in the window support of the JVM but it does not occur often. Is the dave variable used in the stylesheet, for example in an xsl:value-of element ? If it is only declared in the stylesheet then Saxon does not evaluate it.heavydawson wrote:When I debug this code, I can see in the debugger that the line-rate variable has been set correctly, while the dave variable exists but it not set. The lines come directly after each other in the stylesheet. How can it be that one functions correctly and the other not, when the xpath expression is the exact same?
...
It may or may not be related but just today Oxygen started throwing an error on load
Regards,
Sorin
-
- Posts: 14
- Joined: Wed Sep 20, 2006 7:07 pm
Post by heavydawson »
I had used an <xsl:value-of> to print the value, but it wasn't working. It seemed to be some spurious problem, as it has now resolved itself, without me changing anything.
The Oxygen startup error occured seemingly when my browser (Firefox) was running a Java applet at the same time. Again, I'm not sure if they're related, but the problem stopped once I closed Firefox (and as a result, the JVM instantiated by Firefox)
The Oxygen startup error occured seemingly when my browser (Firefox) was running a Java applet at the same time. Again, I'm not sure if they're related, but the problem stopped once I closed Firefox (and as a result, the JVM instantiated by Firefox)
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
If you can reproduce the problem please post a sample stylesheet.heavydawson wrote:I had used an <xsl:value-of> to print the value, but it wasn't working. It seemed to be some spurious problem, as it has now resolved itself, without me changing anything.
Regards,
Sorin
-
- Posts: 14
- Joined: Wed Sep 20, 2006 7:07 pm
Post by heavydawson »
I haven't seen the problem for a while. I'll try and reproduce it if I can.
One thing I should say was that the system is a pretty low spec one.
There's only 512MB of RAM, and it swaps almost 99% of the time even when switching windows.
I think the problem appeared to go away when I closed a few programs and re-opened Oxygen. However, I'll continue to try and reproduce the problem and post a sample stylesheet if I can.
One thing I should say was that the system is a pretty low spec one.
There's only 512MB of RAM, and it swaps almost 99% of the time even when switching windows.
I think the problem appeared to go away when I closed a few programs and re-opened Oxygen. However, I'll continue to try and reproduce the problem and post a sample stylesheet if I can.
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