OSB XQuery Maps

Greetings!
1]. I use OSB 10.3 with Eclipse (OSB Workshop that comes with OSB 10.3 installabe) IDE for doing mapping.
I draw lines from Source to Target structure in XQuery Transformation. I see the source code getting build. When I close the XQuery and open it again in the IDE, I see all the source to target lines in the design view disappear. However the source code is still there. Any ideas what might be wrong here?
2] In my XQuery transformation target structure for elements when I mounse over I see the Nodename, Namespace prefix and Namespace URI. However for some elements I see the namespace URI but no namespace prefix. This is causing problem because in the source code and in the output it produces there are elements without namespace prefix rendering the output invalid. I cant think of why for some elements there are no namespace prefixes. Any advise?
Only think I can think of is that the target structure seem to have a cyclic reference in the schema.. pls see below example. Is this a problem?
<a:element1>
<b:element2>
<a:element3>
</b:element>
</a:element1>
3] I generated XQuery using mapforce for a map and when I tried to use it in OSB, it errored stating Recursive XQueryies are not supported in OSB. Any thots?
Thanks in advance

+2] In my XQuery transformation target structure for elements when I mounse over I see the Nodename, Namespace prefix and Namespace URI. However for some elements I see the namespace URI but no namespace prefix. This is causing problem because in the source code and in the output it produces there are elements without namespace prefix rendering the output invalid. I cant think of why for some elements there are no namespace prefixes. Any advise?+
Only think I can think of is that the target structure seem to have a cyclic reference in the schema.. pls see below example. Is this a problem?
+<a:element1>+
+<b:element2>+
+<a:element3>+
+</b:element>+
+</a:element1>+
Schema cyclic reference was causing the problem with empty namespace. I had to go in to the XQuery and manually add the namespace and prefic and qualify the elements. After this data gets mapped

Similar Messages

  • OSB Xquery mapping from multiple to single by separating its value(s).

    Hi,
    I have one requirement in OSB, can some one explain the implementation for this:
    I have one element which is of type unbound. I need to map this element to a single element and to append all the element values by separating each element value with a ';' before that I need to check whether this element(s) are present in the request then need to appened all these element values to a single element and at the end of this element need to append default values.
    Scenario:
    <student>
    <name>asd</name>
    <address>
    <street>street1</street>
    <street>street2</street>
    <street>street3</street>
    ||
    ||
    </address>
    to be mapped it to:
    <student>
    <field name="NAME">asd</field>
    <field name="ADDRESS">street1;street2;street3;default1;default2;default3</field>
    </student>
    Here need to check if street names are present in the request xml, if yes ned to assign it to ADDRESS as mentioned above whether street names present or not need to append the default values at the end to the ADDRESS field like
    <field name="ADDRESS">default1;default2;default3</field>
    Thanks in advance.

    Hi,
    Here's a query that should answer part of the question :
    <student>
      for $i in doc("doc.xml")/student/*
      return
       <field name="{upper-case(name($i))}">
        if ($i/*) then string-join($i/*, ";")
        else $i/text()
       </field>
    </student>It deals with all possible children of the student node. If a child has descendants, then their values are aggregated like you require, else just the child value is used.
    Additional question : where do the default values come from? Do we just have to "paste" the string "default1;default2;default3" as a whole?
    HTH.

  • Unable to edit XQuery map

    Is anyone else having problems editing XQuery maps in WL Workshop? I have created
    my own schema and then use it to map the input parameters to internal Java types
    for a Web Service. The XQuery editor works fine the first time - that is I bring
    up the graphical editor and draw the lines to define the mapping. After I close
    the editor, I am unable to open up the map again. I get an XQuery Transformation
    error as follows: "Failed to parse the XQuery after user edits". This even happens
    if I try to open a map in the BEA examples project (i.e. InputMapMultiple.jws).
    I am using BEA Platform 8.1 sp2. I opened a case for this issue(482983) and
    it is still being researched, so I thought I would see if anyone else reading
    these newsgroups had some suggestions.

    Hi Bob,
    Yes, this is a known issue.
    A bug report CR168591 has been created to address the issue. Engineering is looking
    into it.
    Let me know if you have any further questions.
    Thanks a lot,
    Vimala Ranganathan
    "Bob H" <[email protected]> wrote:
    >
    Is anyone else having problems editing XQuery maps in WL Workshop? I
    have created
    my own schema and then use it to map the input parameters to internal
    Java types
    for a Web Service. The XQuery editor works fine the first time - that
    is I bring
    up the graphical editor and draw the lines to define the mapping. After
    I close
    the editor, I am unable to open up the map again. I get an XQuery Transformation
    error as follows: "Failed to parse the XQuery after user edits". This
    even happens
    if I try to open a map in the BEA examples project (i.e. InputMapMultiple.jws).
    I am using BEA Platform 8.1 sp2. I opened a case for this issue(482983)
    and
    it is still being researched, so I thought I would see if anyone else
    reading
    these newsgroups had some suggestions.

  • OSB Transformation Mapping values missing

    Hi,
    I'm new to OSB.We have a requirement where it structured in 3 layered architecture consists of BPEL(1),OSB(2),OSB(3).
    So i have created a Business service of my client WSDL from OSB(3) then proxy of type created bussiness service which is having local transport which inturn called by proxy service of http protocol in OSB(2) of type OSB(3) Proxy service.
    My Question is when i call transformations (xsl) in last OSB(3) Mapping is done properly(GETING VALUES MAPPED TO TARGET ONE) .But as per requirement we have to call mapping and transformations in OSB(2) ,wen i called in this way only set text valued paramters is displayed in target.... rest mapped values(like source to target mapping) are coming NULL....
    Please help us to resolve the issue soon since its very urgent requiremnt for our project developement..
    Adavance thanks......

    System hardly proposes rules after migration, you have to manually map them and migrate routines if any basing on ABAP OO.
    As it is a newer version it may not be consistent for all objects.
    What SP are you running ?

  • OSB: xquery as input to xquery

    Hi
    i have stored an xml as xquery. <customer><name>swa</name><name>neh</name></customer>
    i have written another xquery (named result.xquery) which takes input from above xml and produces result. ex: if (data($customer/name)='swa' then 'osb' else '')
    i am assigning customer.xquery to a variable CUSTOMER and applying result transformation.
    since my xml (customer.xquery) is static and reside within OSB only, can i pass it to result.xquery without assigning it to CUSTOMER.
    In short can I pass an xquery as an input to another xquery?
    p.s.: Issue may seem trivial, but in my case i need to get quite a lot static xmls in code and i am instructed not to use java callout.

    In short can I pass an xquery as an input to another xquery?No. You cannot do so.
    i am assigning customer.xquery to a variable CUSTOMER and applying result transformation.Actually when you are assigning a XQuery into variable then OSB internally executes the XQuery and assigns the output of XQuery to the variable. So your variable does not actually hold the reference of the XQuery rather it holds the output of XQuery which you are passing as input to another XQuery.
    You may consider storing mappings into DB and use result caching feature with JCA DB adapter BS to retrieve the mapping's value at runtime.
    Regards,
    Anuj

  • In OSB , xquery issue with large volume data

    Hi ,
    I am facing one problem in xquery transformation in OSB.
    There is one xquery transformation where I am comparing all the records and if there are similar records i am clubbing them under same first node.
    Here i am reading the input file from the ftp process. This is perfectly working for the small size input data. When there is large input data then also its working , but its taking huge amount of time and the file is moving to error directory and i see the duplicate records created for the same input data. I am not seeing anything in the error log or normal log related to this file.
    How to check what is exactly causing the issue here,  why it is moving to error directory and why i am getting duplicate data for large input( approx 1GB).
    My Xquery is something like below.
    <InputParameters>
                    for $choice in $inputParameters1/choice              
                     let $withSamePrimaryID := ($inputParameters1/choice[PRIMARYID eq $choice/PRIMARYID])                
                     let $withSamePrimaryID8 := ($inputParameters1/choice[FIRSTNAME eq $choice/FIRSTNAME])
                     return
                      <choice>
                     if(data($withSamePrimaryID[1]/ClaimID) = data($withSamePrimaryID8[1]/ClaimID)) then
                     let $claimID:= $withSamePrimaryID[1]/ClaimID
                     return
                     <ClaimID>{$claimID}</ClaimID>                
                     else
                     <ClaimID>{ data($choice/ClaimID) }</ClaimID>

    HI ,
    I understand your use case is
    a) read the file ( from ftp location.. txt file hopefully)
    b) process the file ( your x query .. although will not get into details)
    c) what to do with the file ( send it backend system via Business Service?)
    Also noted the files with large size take long time to be processed . This depends on the memory/heap assigned to your JVM.
    Can say that is expected behaviour.
    the other point of file being moved to error dir etc - this could be the error handler doing the job ( if you one)
    if no error handlers - look at the timeout and error condition scenarios on your service.
    HTH

  • OSB - XQuery - line 7, col 2: {err}FORG0005: expected exactly 1 item, got 0

    Hi,
    I am trying to execute the below sample XQuery. Eclipse designer does not show any error. However on executing the XQuery, I get the following error "+Error executing the XQuery transformation: line 7, column 2: {err}FORG0005: expected exactly one item, got 0 items+". Appreciate your help.
    xquery version "1.0" encoding "UTF-8";
    declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
    declare function xf:Ids()
    as element() {*
    *     let $abc := <catalog><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>*
    *     for $product in $abc/catalog/product*
    *     let $name := $product/name*
    *     where $product/@dept = "ACC"*
    *     order by $name*
    *     return $name*
    xf:Ids()

    Thanks, for the answer.
    I just tweeked my XQuery:Var = $abc a little and ended up with same issue. Request your help again.
    xquery version "1.0" encoding "UTF-8";
    declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
    declare function xf:Ids() as element(*)? {
    let $abc := +<catalog><product dept="MEN" xmlns="http://datypic.com/prod"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="ACC"><number>563</number><name language="en">Floppy Sun Hat</name></product><product dept="ACC"><number>443</number><name language="en">Deluxe Travel Bag</name></product><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="WMN"><number>557</number><name language="en">Fleece Pullover</name><colorChoices>navy black</colorChoices></product></catalog>+
    --(:<catalog><product dept="ACC"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>:)--
    for $product in $abc/product
    let $name := $product/name
    where $product/@dept = "ACC"
    order by $name
    return $name
    xf:Ids()

  • How to use typeswitch in osb xquery ?

    Hi all,
    I couldnt understand the syntax of the x query type switch used in osb.Can anybody kindly explain it or give links to examples.
    typeswitch (())
    case $case-var as element(*) return ()
    default ()
    1) what should be given inside the typeswitch (()) ?
    2) what should be given as this variable $case-var ?
    3) what is the meaning of sequence type element(*) ?
    4) Is the typeswitch in x query used to avoid multiple nested if or is it something else ?
    Thank you.
    Edited by: Arun Vikram on Jul 18, 2010 11:47 PM
    Edited by: Arun Vikram on Jul 19, 2010 12:00 AM

    Hi Arun,
    See the section "2.11 Operations on Datatypes" of below doc -
    http://www.w3.org/TR/2001/WD-xquery-20010607/
    typeswitch is explained with an example in this section. typeswitch is similar concept as "switch" in Java.
    1) what should be given inside the typeswitch (()) ?The expression whose dynamic type is being tested.
    2) what should be given as this variable $case-var ?Each CASE clause specifies the name of a type, which must be a subtype of the static type of the operand expression, followed by a RETURN expression.
    3) what is the meaning of sequence type element(*) ?Any XML node
    4) Is the typeswitch in x query used to avoid multiple nested if or is it something else ?As said,The typeswitch expression of XQuery allows users to write queries that are sensitive to dynamic type, yes it helps to avoid multiple nested if to fulfill this use case.
    Regards,
    Anuj
    Edited by: Anuj Dwivedi, TCS on Jul 19, 2010 12:32 PM

  • OSB - Xquery - Eclipse shows warning when a repeating node is repeated

    Hi,
    I have a requirement where a node needs to be repeated. This cannot go into a FOR LOOP as data to be mapped to Target XSD, are constants.
    For this, I repeated the node, by just changing the data in the Name and Value field. When I do this, eclipse, shows me a warning and highlights all the lines. Next time, when I switch to design view and add some direct mapping, eclipse warns me and on proceeding, removes all the lines with warning. Any help, on how I should attempt to solve this issue.
    Give below is the example xquery. Target has the node defined as repeating.
    declare namespace ns1 = "http://abc.com/abc/source";
    declare namespace ns0 = "http://abc.com/abc/target";
    declare namespace xf = "http://tempuri.org/XSD/mapping/";
    declare function xf:mapping($requestMessage1 as element(ns1:requestMessage))
    +as element(ns0:target) {+
    +<ns0:targetHeader>+
    +<ns0:RepeatingNode>+
    +<ns0:Name>Name1</ns0:Name>+
    +<ns0:Value>XPATH to Source field</ns0:Value>+
    +</ns0:RepeatingNode>+
    +<ns0:RepeatingNode>+
    +<ns0:Name>Name2</ns0:Name>+
    +<ns0:Value>Hard coded Value</ns0:Value>+
    +</ns0:RepeatingNode>+
    +<ns0:RepeatingNode>+
    +<ns0:Name>Name3</ns0:Name>+
    +<ns0:Value>Hard coded Value</ns0:Value>+
    +</ns0:RepeatingNode>+
    +<ns0:RepeatingNode>+
    +<ns0:Name>Name4</ns0:Name>+
    +<ns0:Value>XPATH to Source field</ns0:Value>+
    +</ns0:RepeatingNode>+
    +<ns0:RepeatingNode>+
    +<ns0:Name>Name5</ns0:Name>+
    +<ns0:Value>Hard coded Value</ns0:Value>+
    +</ns0:RepeatingNode>+
    +</ns0:targetHeader>+
    Regards.
    Edited by: 874988 on Jul 25, 2011 7:01 PM

    design mode is OK until you start customizing by hand your xquery... if you muck around the mapping sometimes is lost.
    I would suggest you to complete your mapping by hand!

  • OSB disk map issue !

    Dear Friends ,
    we are using Oracle secure backup (10.4.0.2.0) with management server Oracle Linux 6.1_64 bit . My problem is during reboot the server the below mapping lost its sequence . Please follow the output :
    |Before Reboot|
    1)
    [root@dcbackup ~]# sg_map -i -x
    /dev/sg0 0 2 0 0 0 /dev/sda LSI MR9261-8i 2.12
    /dev/sg1 5 0 0 0 5 /dev/scd0 TEAC DV-W28SS-W 1.0A
    /dev/sg2 7 0 0 0 1 /dev/nst0 HP Ultrium 5-SCSI Z55S
    /dev/sg3 7 0 0 1 8 STK SL150 0182
    /dev/sg4 7 0 1 0 1 /dev/nst1 HP Ultrium 5-SCSI Z55S
    /dev/sg5 7 0 1 1 8 STK SL150 0182
    /dev/sg6 8 0 0 0 0 /dev/sdb ORACLE SSM PMAP
    2)
    [root@dcbackup ~]# obtool vfylibs -av
    collecting dte info...
    library STK ...
    *** th0__warning: number of storage elements default (42) differs from current (30)
    *** th0__warning: number of import export elements default (5) differs from current (4)
    *** th0__warning: number of data transfer elements default (2) differs from current (1)
    dte 1: tape1 ((from lib) sn HU1246T749)
    verifying dte definitions against drive objects...
    library STK ...
    dte 1 tape1 ((from lib) sn HU1246T749) ...
    attach point dcbackup:/dev/sg4 ...
    (from drv) HP Ultrium 5-SCSI HU1246T749 id matches
    No errors encountered verifying configuration.
    | After Reboot |
    1)
    root@dcbackup ~]# sg_map -i -x
    /dev/sg0 0 0 0 0 1 /dev/nst0 HP Ultrium 5-SCSI Z55S
    /dev/sg1 0 0 0 1 8 STK SL150 0182
    /dev/sg2 1 2 0 0 0 /dev/sda LSI MR9261-8i 2.12
    /dev/sg3 0 0 1 0 1 /dev/nst1 HP Ultrium 5-SCSI Z55S
    /dev/sg4 0 0 1 1 8 STK SL150 0182
    /dev/sg5 6 0 0 0 5 /dev/scd0 TEAC DV-W28SS-W 1.0A
    /dev/sg6 8 0 0 0 0 /dev/sdb ORACLE SSM PMAP
    2) Got the 'dte' error :
    [root@dcbackup ~]# obtool vfylibs -av
    collecting dte info...
    library STK ...
    *** th0__warning: number of storage elements default (42) differs from current (30)
    *** th0__warning: number of import export elements default (5) differs from current (4)
    *** th0__warning: number of data transfer elements default (2) differs from current (1)
    dte 1: tape1 ((from lib) sn HU1246T749)
    verifying dte definitions against drive objects...
    library STK ...
    dte 1 tape1 ((from lib) sn HU1246T749) ...
    attach point dcbackup:/dev/sg4 ...
    Wrong id reported by drive:
    (from lib) sn HU1246T749
    (from drv) STK SL150 464970G+1319SY0918
    (No other dte found with an id that matches this id.)
    Summary of verify errors:
    dte configuration errors: 1
    >Also , below output also be changed :
    Before :
    [root@dcbackup ~]# ls -l /dev/tape/by-id
    total 0
    lrwxrwxrwx. 1 root root 9 Jan 19 14:32 scsi-3500104f000cd6a57 -> ../../sg4
    lrwxrwxrwx. 1 root root 10 Jan 19 14:32 scsi-3500104f000cd6a57-nst -> ../../nst1
    After :
    [root@dcbackup ~]# ls -l /dev/tape/by-id
    total 0
    lrwxrwxrwx. 1 root root 9 Jan 19 14:32 scsi-3500104f000cd6a57 -> ../../sg1
    lrwxrwxrwx. 1 root root 10 Jan 19 14:32 scsi-3500104f000cd6a57-nst -> ../../nst1
    Does anybody  has any experience regarding this issue ?
    Why these changes are made and Does the above changes are normal behavior or not ?

    I suggest you to map the drives in OSB with the /dev/tape/by-id/scsi-* insted of using /dev/sg*, because the /dev/sg* file are rebuild during system boot, and they are not always discovered in the same order, but as the /dev/tape/by-id/scsi-* is based on an scsi ID it never changes.
    Regards

  • OSB XQuery Issue

    Hi,
    I have an xml A containing 100 elements.
    I have an xml B containing 500 elements out of which 75 are mandatory while rest are optional.
    I am transforming from xml A to xml B using XQuery Transformation.
    While transforming, the mandatory ones in xml B are coming perfectly, but the optional ones are coming empty.
    For example:
    Incoming xml:
    <Name>
    <FirstName>John</FirstName>
    </Name>
    Expected Response:
    <NAME>
    <FNAME>John</FNAME>
    </NAME>
    If element <FirstName> is not present I get the empty node in my transformed xml.
    Eg.
    <NAME>
    <FNAME/>
    </NAME>
    Is there any way to avoid the empty node tag without specifically adding IF ELSE conditions.
    I am working on OSB 11.1.1.5
    Please help.
    Regards,
    Karthik

    Hi Karthik,
    There is no if/then/else in xquery, in xquery you use FLOWR.
    http://www.w3schools.com/xquery/xquery_flwor.asp
    <NAME>
    for $a in (/Name/FirstName)
    return
    <FNAME>data($a)</FNAME>
    </NAME>This will omit the FNAME if there is no FirstName...
    Note that I didn't verify the syntax, but I think you'll get the idea...
    Cheers,
    Vlad

  • OSB - XQuery - Sample Switch Case

    Hi,
    Can some one pls give me a sample XQ, with Switch Case statement in it, which [Syntax] works in OSB.
    Regards,
    Kaleem...

    I am really afraid that OSB 11g supports XQuery 1.0
    http://download.oracle.com/docs/cd/E21764_01/doc.1111/e15867/xquery.htm
    while the switch statement is introduced only in XQuery 1.1
    http://www.w3.org/TR/2009/WD-xquery-11-20091215/#id-switch
    for the time being, you will have to resort to a cascade of if - then - else :o(

  • OSB - XQuery - line 24, col 1 {err}FORG0005: expected 1 item, got 2 or mor

    In the below XQ, I am trying to learn making calls to local functions. I have tweaked my earlier XQ, which had a local variable defined [in xf:getCost() function] as XPath to Quantity. Now, I have modified the XQ to make a call to xf:getQty() from xf:getCost(), to get the desired Quantity.
    On executing the below code I get Error occurred while executing XQuery: line 24, column 1: {err}FORG0005: expected exactly one time, got 2+ items. Either the XQuery is invalid or .... Request Help
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma type="xs:anyType" ::)
    declare namespace xf = "http://tempuri.org/purchaseOrder/";
    declare function xf:getCost()
    as xs:double {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    let $s1 := $po/order-item/@price
    let $s2 := $po/order-item/@quantity
    let $s3 := sum(for $el at $i in $s1 return $s1[$i] * xf:getQty($i))
    return $s3
    declare function xf:getQty($index as xs:decimal)
    as xs:decimal {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    return ($po/order-item/@quantity[$index])
    xf:getCost()

    return ($po/order-item[$index]/@quantity)
    not
    return ($po/order-item/@quantity[$index])

  • ALSB (OSB) xquery support for fn:error

    Hi all,
    I've got a function which performs a check and eventually raise a fn:error
    In my IDE works fine and stop the transformation reporting the error, in Workshop it doesn't and complete the transformation anyway.
    Is there anything to enable? Is it supported? What other options I have?
    Thanks in advance

    Please refer -
    Re: XQuery fn:error function Issue
    Regards,
    Anuj

  • Xquery mapping from Complext type to Array type

    Hi,
    please help to solve this , i will post my source xsd nad target xsd,source has complex type and target xsd has assry type ,i need a direct mapping with elements[one to one mappling]
    pls help me to solve,
    SOURCE XSD
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="updateOrderStatus">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="orderStatusUpdate">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="orderDetails">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="lineItems">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="lineItemList">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence>
    <xs:element type="xs:string" name="itemStatus"/>
    <xs:element name="shippingDetail">
    <xs:complexType>
    <xs:sequence>
    <xs:element type="xs:int" name="quantity"/>
    <xs:element type="xs:string" name="shipper"/>
    <xs:element type="xs:string" name="trackingNumber"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element type="xs:string" name="skuId"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element type="xs:string" name="orderId"/>
    <xs:element type="xs:string" name="orderStatus"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    TARAGET XSD
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.atg.com/com.nbty.commerce.integration.orderstatusupdate" xmlns:tns="http://www.atg.com/com.nbty.commerce.integration.orderstatusupdate" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <complexType name="OrderStatusUpdate">
    <all>
    <element name="orderDetails" nillable="true" type="tns:OrderDetails"/>
    <element name="orderId" nillable="true" type="xsd:string"/>
    <element name="orderStatus" nillable="true" type="xsd:string"/>
    </all>
    </complexType>
    <complexType name="OrderDetails">
    <all>
    <element name="lineItems" nillable="true" type="tns:LineItems"/>
    </all>
    </complexType>
    <complexType name="LineItems">
    <all>
    <element name="lineItemList" nillable="true" type="tns:ArrayOfLineItem"/>
    </all>
    </complexType>
    <complexType name="ArrayOfLineItem">
    <complexContent>
    <restriction base="soap-enc:Array">
    <attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:LineItem[]"/>
    </restriction>
    </complexContent>
    </complexType>
    <complexType name="LineItem">
    <all>
    <element name="itemStatus" nillable="true" type="xsd:string"/>
    <element name="shippingDetail" nillable="true" type="tns:ShippingDetail"/>
    <element name="skuId" nillable="true" type="xsd:string"/>
    </all>
    </complexType>
    <complexType name="ShippingDetail">
    <all>
    <element name="quantity" nillable="true" type="xsd:string"/>
    <element name="shipper" nillable="true" type="xsd:string"/>
    <element name="trackingNumber" nillable="true" type="xsd:string"/>
    </all>
    </complexType>
    </schema>
    regards
    Abhi

    Hi,
    Here's a query that should answer part of the question :
    <student>
      for $i in doc("doc.xml")/student/*
      return
       <field name="{upper-case(name($i))}">
        if ($i/*) then string-join($i/*, ";")
        else $i/text()
       </field>
    </student>It deals with all possible children of the student node. If a child has descendants, then their values are aggregated like you require, else just the child value is used.
    Additional question : where do the default values come from? Do we just have to "paste" the string "default1;default2;default3" as a whole?
    HTH.

Maybe you are looking for