XWatch problems -- one watch expression corrupts other watch
Posted: Wed Sep 11, 2013 6:26 pm
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/*
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/*