Page 1 of 1

XWatch problems -- one watch expression corrupts other watch

Posted: Wed Sep 11, 2013 6:26 pm
by mattcoarr
I have a problem with a stylesheet.

The stylesheet has:
* a stylesheet level param, let's call it targetIdList. This is typed as xs:string*
* a root template (e.g. match="/")
* a named template, let's call it "process"

I debug this stylesheet and set a breakpoint before the call to the name template.

The root stylesheet has a number of variables. One of the main ones is called $reference.

Here's how things break in XWatch.

1. add a watch for $reference. This works fine. I can add several of these and they still work fine. I can also add watches for $reference/*, and that also works fine. The "value type" column shows "document-node(1)" and the "value" column shows "<#document/fragment>". Just like it's supposed to!

2. add a watch for the expression I really want:

$normalized/myns:MainList/*[some $candidateId in $targetIdList satisfies @idref = $candidateId]

So this comes back and there's empty values in the "value type" and "value" columns in XWatch. That's the first problem.

3. Second problem is that if I add another watch for $normalized (same thing as in step 1 so it should return the "document/fragment" value!!), it now comes back with the "value type" column showing "xs:untypedAtomic" and the "value" column shows the string value of the idref attribute of the last child of $normalized/myns:MainList/*

Re: XWatch problems -- one watch expression corrupts other w

Posted: Wed Sep 25, 2013 5:52 pm
by adrian
Hi,

I tried to contact you privately (mail) but did not receive an answer.
Could you please send us a set of sample XML and XSL files with which the problem can be reproduced?

Regards,
Adrian

Re: XWatch problems -- one watch expression corrupts other w

Posted: Thu Feb 20, 2014 11:32 am
by malvarez
I've found similar problem during debugging transformation XML -> DocBook 5.0 on Oxygen v15.2
I've a variable with a value assigned from a call-template which it's filled then with a node-set:

<xsl:variable name="conversionTemplates">
<xsl:call-template name="buildConversionTemplates"/>
</xsl:variable>

This variable is later passed to a template for latter processing

<xsl:call-template name="BuildHtmlTemplates">
<xsl:with-param name="conversionTemplates" select="$conversionTemplates"/>
</xsl:call-template>

When I debug my xsl template and set a watch to $conversionTemplates inside BuildHtmlTemplates template, Xwatch component first displays it as a document-node() and I can browse it's child nodes correctly. Then I set a more complex XWatch expression like:
$conversionTemplates//part[child::title/text() = $templateName]
It sets such value type as item() and when I click back to previously defined watch expression $conversionTemplates, it becomes item() as value type and I can't no longer watch it's hierarchy.

Re: XWatch problems -- one watch expression corrupts other w

Posted: Fri Feb 21, 2014 6:20 pm
by adrian
Hi,

Thank you for the feedback.

We need to reproduce this problem in order to investigate it.
Would it be possible to send us the customization you made or a sample where this problem reproduces?
If that's possible, please send the involved files to support AT oxygenxml DOT com

Regards,
Adrian

Re: XWatch problems -- one watch expression corrupts other w

Posted: Tue Feb 25, 2014 9:14 pm
by malvarez
I've send a sample project scenario to reproduce such error to the requested email address, hope it helps.
Thank you for your attention.

Re: XWatch problems -- one watch expression corrupts other w

Posted: Tue Mar 17, 2015 7:53 pm
by Remi
Hi,

Is there any help, as I have the same problem ?

Thanks a lot

Re: XWatch problems -- one watch expression corrupts other w

Posted: Wed Mar 18, 2015 6:36 pm
by adrian
Hi Remi,

The OP provided samples and we were able to identify a situation where an XWatch expression could corrupt the current context. A bug for this problem is currently logged on our issue tracking tool, but it has not been resolved yet (v16.1).

Regards,
Adrian

Re: XWatch problems -- one watch expression corrupts other w

Posted: Wed Jun 17, 2015 12:07 pm
by Radu
Hi,

Just to update this thread, the issue should be fixed in Oxygen 17.0.

Regards,
Radu