XSL debugger 'immediate' window
Are you missing a feature? Request its implementation here.
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
XSL debugger 'immediate' window
I am referring to something similar to the VS immediate window.
I don't even care about an ability to assign values, just to be able to display any random xpath or variable that is currently defined and valid.
One big one is 'current()'. I have not found an easy way to display 'current()'.
It does not exist in the variable list(that would be helpful).
The only way I have found is to create a dummy variable, assign it current and then use that variable so that it gets actually executed.
This is certainly very ugly.
Either I am missing something obvious or providing this feature has some inherent challenge I am unaware of but it seems like a natural.
I would be thrilled if I am in fact missing something obvious and someone can be kind enough to point it out to me.
R.
I don't even care about an ability to assign values, just to be able to display any random xpath or variable that is currently defined and valid.
One big one is 'current()'. I have not found an easy way to display 'current()'.
It does not exist in the variable list(that would be helpful).
The only way I have found is to create a dummy variable, assign it current and then use that variable so that it gets actually executed.
This is certainly very ugly.
Either I am missing something obvious or providing this feature has some inherent challenge I am unaware of but it seems like a natural.
I would be thrilled if I am in fact missing something obvious and someone can be kind enough to point it out to me.
R.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSL debugger 'immediate' window
Post by sorin_ristache »
Hello,
Regards,
Sorin
This post seems to be out of context. I do not know what you mean by "VS immediate window" and "this feature". Can you post more details and an example of the XPath expression and the variable that you mentioned?rkeron wrote:I am referring to something similar to the VS immediate window.
I don't even care about an ability to assign values, just to be able to display any random xpath or variable
...
Either I am missing something obvious or providing this feature has some inherent challenge.
Regards,
Sorin
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
Re: XSL debugger 'immediate' window
Sorry Sorin,
I was not very clear.
What I am referring to is you debugging environment and specifically the ability to step through XSL transformations.
First, I am thrilled with the product and all the excellent tools it contains.
I also work with Microsoft Visual Studio(VS). In visual Studio, in addition to being able to see the value of variables and set break points and watch variables etc., I can also open a window which MS calls the immediate window.
In that window I can just type something like "? xxx" which means display the value of the variable xxx.
Of course that only is usable when I have stopped execution at a break point.
Any variable that is in scope and valid at that breakpoint is accessible in this window.
I can also override the current value of that variable and then continue execution if I want to test something specific.
As I said I don't care about being able to dynamically set a value at a breakpoint but being able to display any random value would be nice.
I know I can do most of that by just looking at your variable treeview.
I can click on any variable and expand it and look at subnodes etc.
I guess what I am really after is a way to see the current value of the XSL 'system' variables.
When I hit a breakpoint it would be really useful to be able to see what the value of 'current()' is within the for-each loop I am currently in.
Things like 'following-sibling' etc. would occasionally be useful but current would be the big one.
You could even add these 'system' variables to the list of variables you already display. That would be wonderful.
As I said in my initial post, perhaps this is already available and I am just too slow to find it.
If so please tell me how.
Thanks for your swift response.
R.
I was not very clear.
What I am referring to is you debugging environment and specifically the ability to step through XSL transformations.
First, I am thrilled with the product and all the excellent tools it contains.
I also work with Microsoft Visual Studio(VS). In visual Studio, in addition to being able to see the value of variables and set break points and watch variables etc., I can also open a window which MS calls the immediate window.
In that window I can just type something like "? xxx" which means display the value of the variable xxx.
Of course that only is usable when I have stopped execution at a break point.
Any variable that is in scope and valid at that breakpoint is accessible in this window.
I can also override the current value of that variable and then continue execution if I want to test something specific.
As I said I don't care about being able to dynamically set a value at a breakpoint but being able to display any random value would be nice.
I know I can do most of that by just looking at your variable treeview.
I can click on any variable and expand it and look at subnodes etc.
I guess what I am really after is a way to see the current value of the XSL 'system' variables.
When I hit a breakpoint it would be really useful to be able to see what the value of 'current()' is within the for-each loop I am currently in.
Things like 'following-sibling' etc. would occasionally be useful but current would be the big one.
You could even add these 'system' variables to the list of variables you already display. That would be wonderful.
As I said in my initial post, perhaps this is already available and I am just too slow to find it.
If so please tell me how.
Thanks for your swift response.
R.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSL debugger 'immediate' window
Post by sorin_ristache »
Hello,
The variables that are in scope at the current stop in the execution of the transformation are visible in the Variables view. For viewing XPath expressions that include XSLT/XPath functions like current() and axes like following-sibling you should look at the XWatch view of the XSLT Debugger perspective.
Regards,
Sorin
The variables that are in scope at the current stop in the execution of the transformation are visible in the Variables view. For viewing XPath expressions that include XSLT/XPath functions like current() and axes like following-sibling you should look at the XWatch view of the XSLT Debugger perspective.
Regards,
Sorin
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
Re: XSL debugger 'immediate' window
Thanks Sorin.
Unfortunately, I am still unable to get it working in the Xwatch for 'current()'.
I can set 'last()' no problem. I can check random xpaths no problem.
I would assume that I would just type 'current()' in the Expression column just as 'last()' is typed in the document link you sent me.
When I type in current() and hit enter, I get the error 'current() function should have been rewritten at compile time'.
I think this is a Saxon error is it not?
No matter where I set break points in my code(inside or outside of a for-each) I get this error.
Thoughts?
R.
Unfortunately, I am still unable to get it working in the Xwatch for 'current()'.
I can set 'last()' no problem. I can check random xpaths no problem.
I would assume that I would just type 'current()' in the Expression column just as 'last()' is typed in the document link you sent me.
When I type in current() and hit enter, I get the error 'current() function should have been rewritten at compile time'.
I think this is a Saxon error is it not?
No matter where I set break points in my code(inside or outside of a for-each) I get this error.
Thoughts?
R.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSL debugger 'immediate' window
Post by sorin_ristache »
I think it is an optimization that Saxon applies to the transformation for running it faster but unfortunately the optimization is not optional (it cannot be disabled). You have to use the workaround that you found: declare a dummy variable with the value current() and use it in an expression for avoiding the Saxon optimization.
Regards,
Sorin
Regards,
Sorin
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
Re: XSL debugger 'immediate' window
Sorin,
Thanks for your help.
I guess that I would reiterate that the ability to easily display current() at a breakpoint would be extremely valuable to anyone debugging complex xsl transformations.
That would be my feature request for a future release.
Thanks again,
R.
Thanks for your help.
I guess that I would reiterate that the ability to easily display current() at a breakpoint would be extremely valuable to anyone debugging complex xsl transformations.
That would be my feature request for a future release.
Thanks again,
R.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XSL debugger 'immediate' window
Post by sorin_ristache »
So far we did not find a way to evaluate an expression containing a variable or function that was removed from the compiled transform by the Saxon optimization. We will try to look into it more carefully for a future version of Oxygen.
I hope this helps,
Sorin
I hope this helps,
Sorin
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XSL debugger 'immediate' window
oXygen shows the value of the current node while you debug in a view called Context. We plan to improve that to show more context information.
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