Hi,

I have a requirement where in I have to return the results in user preference 
order.


Currently the order of the xml element is fixed :


<results>

    <result>
        <PDF>/pdfs/0000025.pdf</PDF>
        <Name>ABC</Name>
        <Date>2015-01-01</Date>
        <Status>Active</Status>
    </result>
    <result>
        <PDF>/pdfs/0000028.pdf</PDF>
        <Name>XYZ</Name>
        <Date>2015-01-07</Date>
?        <Status>Terminated</Status>
    </result>
</results>


Now I need to return the results in the below order (or Custom Order):


let $columnOrder := Name;Date;Status;PDF


So ,the output should be like:

<results>

    <result>
        <Status>Active</Status>
        <Name>ABC</Name>
       <PDF>/pdfs/0000025.pdf</PDF>
        <Date>2015-01-01</Date>
     </result>
    <result>
?       <Status>Terminated</Status>
        <Name>XYZ</Name>
       <PDF>/pdfs/0000028.pdf</PDF>?
        <Date>2015-01-017</Date>
    </result>
</results>

Let me know, how can I achieve this.

Thanks
Pragya



"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to