Oxygen overwrote xsl script during debugging session
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Oxygen overwrote xsl script during debugging session
I'm sure I must have hit some button inadvertently but it was a surprise and potentially very costly mistake.
I was debugging an xsl acript, the debugger view started as usual, 3 main views, on the left was the source xml document, in the middle was the xsl script, on the right was the empty pane that the result document would show up in.
I set a break point in the source doc and hit the run button. It stopped on the break point and then a moment later the xsl document was replaced with the output of the transformation result created up to the break point..
WTF!!!! Not only that but the xsl script was gone! Nada, toast! I could not hit undo and restore it! This is one of my main xsl scripts. Luckily I backup every morning, well most mornings, sometimes the network is glitchy and a backup will fail, but thats pretty rare. Also lucky I hadn't done much work in that file today so only lost 30-45 minutes work which took an hour to recover. 2 hours lost to a unknown glitch.
The big question is how or why did did this happen and how do I prevent it from ever happening again! Why did the result of a debug session get written to the xsl file? It's never happened before and I don't remember changing anything previous to that that could cause that?
And Why didn't I get the "This file changed on disk, do you wish to reload the file" warning. I would have said **** NO!
Scott
I was debugging an xsl acript, the debugger view started as usual, 3 main views, on the left was the source xml document, in the middle was the xsl script, on the right was the empty pane that the result document would show up in.
I set a break point in the source doc and hit the run button. It stopped on the break point and then a moment later the xsl document was replaced with the output of the transformation result created up to the break point..
WTF!!!! Not only that but the xsl script was gone! Nada, toast! I could not hit undo and restore it! This is one of my main xsl scripts. Luckily I backup every morning, well most mornings, sometimes the network is glitchy and a backup will fail, but thats pretty rare. Also lucky I hadn't done much work in that file today so only lost 30-45 minutes work which took an hour to recover. 2 hours lost to a unknown glitch.
The big question is how or why did did this happen and how do I prevent it from ever happening again! Why did the result of a debug session get written to the xsl file? It's never happened before and I don't remember changing anything previous to that that could cause that?
And Why didn't I get the "This file changed on disk, do you wish to reload the file" warning. I would have said **** NO!
Scott
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Re: Oxygen overwrote xsl script during debugging session
I have a little more information on this data loss problem.
MY script generates a single document or splits the output into multiple documents depending on a parameter.
So I am using result-document for both type of output so I can pass in the named <output...>
my two result-document calls
multiple files, this is in a for-each loop with $filename changing for each chapter.
single document, this is where the debugger wipes out the script.xsl file
all very similar except there is no href attribute supplied to result document because saxon handles where the output goes.
The result-document call without a href, causes data loss, very bad!
How can I keep the needed versatility of my script and still use the debugger without smashing the script being debugged and see the output of the transformation in the data output view?
Scott
MY script generates a single document or splits the output into multiple documents depending on a parameter.
So I am using result-document for both type of output so I can pass in the named <output...>
my two result-document calls
multiple files, this is in a for-each loop with $filename changing for each chapter.
Code: Select all
<xsl:result-document href="{$filename}" format="csps-xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </meta>
...
Code: Select all
<xsl:result-document format="csps-xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </meta>
The result-document call without a href, causes data loss, very bad!
How can I keep the needed versatility of my script and still use the debugger without smashing the script being debugged and see the output of the transformation in the data output view?
Scott
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Re: Oxygen overwrote xsl script during debugging session
I have found a solution to my problem, though it doesn't prevent the bug in the editor from overwriting someboys script in the future.
I was reading the spec for <output..> and realized I can have more than one definition!
One that is named to pass to <result-document>(multiple output) and an identical one that is not named for default processing(single output) that does not use <result-document>!
The only issue is my current copy of saxon 9.1.0.7, complains when I have two <output>'s, a named and an unnamed <output> element(s)?
If I use HE9.3.05, it processes multiple <output> elements, but then I can't use
to output hex upperlevel unicode...
The HE parser won't accept that URI and says I have to purchase the PE version to use it?
I guess I don't get to have my cake and eat it too?
Scott
so that the

I was reading the spec for <output..> and realized I can have more than one definition!
One that is named to pass to <result-document>(multiple output) and an identical one that is not named for default processing(single output) that does not use <result-document>!
The only issue is my current copy of saxon 9.1.0.7, complains when I have two <output>'s, a named and an unnamed <output> element(s)?
If I use HE9.3.05, it processes multiple <output> elements, but then I can't use
Code: Select all
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
saxon:character-representation="hex"
The HE parser won't accept that URI and says I have to purchase the PE version to use it?
I guess I don't get to have my cake and eat it too?
Scott
so that the
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Oxygen overwrote xsl script during debugging session
Hi,
If there is no output set for a transformation then all relative references on result-document were resolved to the current working directory, which normally is the oXygen installation folder. We modified this by setting the system ID as the XSLT system ID and everything worked well even with the result-document without href. However, in the last version of Saxon included in oXygen there was a change in Saxon behavior that instead of directing that output to the principal result (the default output) passes the resolved href value against the output system ID through a resolver and as you probably see by now in case of an empty href that ends up as the stylesheet system ID.
oXygen asks for confirmation on reloading content from disk, but the default is set to ask only if the file is modified inside the editor.
We fixed this already and version 12.2 (a free upgrade from 12.1) will have this fix included.
Sorry for the trouble this caused you!
Best Regards,
George
If there is no output set for a transformation then all relative references on result-document were resolved to the current working directory, which normally is the oXygen installation folder. We modified this by setting the system ID as the XSLT system ID and everything worked well even with the result-document without href. However, in the last version of Saxon included in oXygen there was a change in Saxon behavior that instead of directing that output to the principal result (the default output) passes the resolved href value against the output system ID through a resolver and as you probably see by now in case of an empty href that ends up as the stylesheet system ID.
oXygen asks for confirmation on reloading content from disk, but the default is set to ask only if the file is modified inside the editor.
We fixed this already and version 12.2 (a free upgrade from 12.1) will have this fix included.
Sorry for the trouble this caused you!
Best Regards,
George
George Cristian Bina
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Oxygen overwrote xsl script during debugging session
Your last reply and my reply were almost in the same time...
Maybe it is not clear from my earlier reply but if you set an output file for the transformation output then the result-document without href will go to that file and you will not have this problem anymore.
Version 12.2 is expected to be available really soon - we are fixing the last issues and getting ready for the final release phase.
Best Regards,
George
Maybe it is not clear from my earlier reply but if you set an output file for the transformation output then the result-document without href will go to that file and you will not have this problem anymore.
Version 12.2 is expected to be available really soon - we are fixing the last issues and getting ready for the final release phase.
Best Regards,
George
George Cristian Bina
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Oxygen overwrote xsl script during debugging session
Do not worry... only trial licenses are expiring, all the other licenses are permanent. If you are referring to the maintenance pack then you should know that you need that further only to access following major versions (that is 13.0, etc.), all version 12.x releases work with the same license key that is good for 12.0.
Best Regards,
George
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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