This discussion is archived
1 Reply Latest reply: Apr 25, 2012 4:57 AM by 667006 RSS

Using XQuery Transformation Providing Attribute or Not Providing Attribute

user13582086 Newbie
Currently Being Moderated
----URGENT----
ASAP reply....


Using XQuery Transformation, I have mapped 1 - 1 relation for elements with attributes:


Scenario


1) *If the attribute is provided in the request like AttributeType="First" then getting response as attribute i.e., AttributeType="First"*

Example:
Request Side:

<xs0:Student AttributeType="First" AttributeType2="Second" AttributeType3="Third">
<xs0:studentName>John</xs0:studentName>
</xs0:Install>


Response Side is:

<xs0:Student AttributeType="First" AttributeType2="Second" AttributeType3="Third">
<xs0:StudentName>John</xs0:StudentName>
</xs0:Student>


2) *If the attribute is not provided in the request like AttributeType="First" then not getting response as default attribute i.e., _AttributeType="First"*

Request Side:

<xs0:Student AttributeType2="Second" AttributeType3="Third">
<xs0:StudentName>John</xs0:StudentName>
</xs0:Student>


Response Side:

<xs0:Student AttributeType="First" AttributeType2="Second" AttributeType="Third">
<xs0:StudentName>John</xs0:StudentName>
</xs0:Student>

In the above first example condition is executing fine but in second example is not executing and not getting default attribute on response (underlined).

If anybody know's this condition using XQuery Transformation code please help me ASAP....


I am new in this writing XQuery functions. Please help me ASAP......

Sorry! Urgent....


Thanks
Harsha Rao....

Edited by: user13582086 on Apr 19, 2012 9:08 AM

Edited by: user13582086 on Apr 19, 2012 9:09 AM

Edited by: user13582086 on Apr 19, 2012 6:40 PM

Edited by: user13582086 on Apr 19, 2012 6:52 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points