Forum Stats

  • 3,876,064 Users
  • 2,267,049 Discussions
  • 7,912,415 Comments

Discussions

Self closing tags appearing in xquery

886411
886411 Member Posts: 4
edited Dec 24, 2013 4:33AM in XQuery

I am working on a migration project where the weblogic is getting migrated from weblogic 8 to 10.x

my application uses xquery and when upgraded to higher version i can see some self closing tags getting created in the transformed xml which is not the case with 8.1.

for example:

I have given a simple declaration as below

let $a  := <find an attribute value>

return

<abc:value>{$a}</abc:value>

if the "find an attribute value" returns null then in weblogic 8 the node will not be sent in transformed xml but in weblogic10.x it is parsing the node as self closing one like <abc:value/>

Is this an issue with migration? I know that the xquery upgraded to 2004 and I did took care of that part.

Answers

  • odie_63
    odie_63 Member Posts: 8,493 Silver Trophy
    Is this an issue with migration?
    

    I would rather say that a bug has been fixed.

    A direct element constructor must always generate a node regardless of its content.

    odie_63
  • 886411
    886411 Member Posts: 4

    Thanks Odie!

    So workaround for me in this case would be? as i have number of direct mappings happening in my code of 8.1 and definitely I can't keep an if else block to make it work.

  • odie_63
    odie_63 Member Posts: 8,493 Silver Trophy
    So workaround for me in this case would be? as i have number of direct mappings happening in my code of 8.1 and definitely I can't keep an if else block to make it work.
    

    Well, as you've been relying on a bug then I guess you now have to correct your code.

    I don't see how you can do it without using a conditional block.

This discussion has been closed.