[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Xquery help to add element to loop

Subject: Re: Xquery help to add element to loop
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Fri, 26 Aug 2011 08:47:55 -0700 (PDT)
Re:  Xquery help to add element to loop
Thanks for the reply.

But I need to use only xquery. Oepe is just a design
tool helpful for creating xq. Any valid xquery code is good. 


----- Original
Message -----
From: Michael Kay <mike@xxxxxxxxxxxx>
To:
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc: 
Sent: Friday, August 26, 2011 11:34 AM
Subject: Re:  Xquery help to add element to loop

On 26/08/2011 14:26,
Andrew Welch wrote:
> The correct list is:
http://x-query.com/mailman/listinfo/talk

But since you posted here, it seems
appropriate to point out that making 
small changes to documents like this is
much easier in XSLT than in 
XQuery. (Though I have no idea what oepe might
be.)

I won't provide a solution because I can't work out what your
requirements are from the specimen input and output.

Michael Kay
Saxonica
>
>
> On 26 August 2011 14:21, sudheshna iyer<sudheshnaiyer@xxxxxxxxx>  wrote:
>>
I want to prepare an element of complex type and add it to the list of
elements. How can I achieve this in xquery? I am using oepe..
>>
>> I am not
sure whether this is the right forum for xquery. If not, do any body know the
right forum for xquery?
>> =============
>> Input.xml
>> <customer>
>> 
<HeaderLevel>
>>    <Id>3</Id>
>>    <HAddressLine1>haa</HAddressLine1>
>>   
<HAddressLine2>hbb</HAddressLine2>
>>  </HeaderLevel>
>>  <Addresses>
>>   
<Address>
>>    <Id>1</Id>
>>    <AddressLine1>aa</AddressLine1>
>>   
<AddressLine2>bb</AddressLine2>
>>    </Address>
>>    <Address>
>>   
<Id>2</Id>
>>    <AddressLine1>aa</AddressLine1>
>>   
<AddressLine2>bb</AddressLine2>
>>    </Address>
>>  </Addresses>
>>
</customer>
>> =============
>> Output  should be:
>> <?xml version="1.0"
encoding="UTF-8"?>
>> <customer_transitioned>
>>  <Addresses_transitioned>
>> 
  <Address_transitioned>
>>    <Id_t>1</Id_t>
>>   
<AddressLine1_t>aa</AddressLine1_t>
>>    <AddressLine2_t>bb</AddressLine2_t>
>>    </Address_transitioned>
>>    <Address_transitioned>
>>    <Id>2</Id>
>>    <AddressLine1_t>aa</AddressLine1_t>
>>   
<AddressLine2_t>bb</AddressLine2_t>
>>    </Address_transitioned>
>>   
<Address_transitioned>
>>    <Id>3</Id>
>>   
<AddressLine1_t>haa</AddressLine1_t>
>>   
<AddressLine2_t>hbb</AddressLine2_t>
>>    </Address_transitioned>
>> 
</Addresses_transitioned>
>> </customer_transitioned>
>>
>> =============
>>
>> --~------------------------------------------------------------------
>>
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>> To
unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
>> or
e-mail:<mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
>> --~--

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.