XQuery Programmer Needed... 12 Hour Turnaround!

Discussion in 'JavaScript' started by robster, Mar 25, 2007.

  1. #1
    I need someone who knows xquery for a very quick immediate need (12 hour)

    Please PM me if you can take one xml document and convert it to another xml formatting using xquery.

    Thanks!!

    Rob
     
    robster, Mar 25, 2007 IP
  2. robster

    robster Peon

    Messages:
    94
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here is the original...

    <feed version="0.3" lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="news.xsd">
    <title>Get News</title>
    <link href="http://www.get.com/"/>
    <author>
    <name>CSC513 Inc.</name>
    <email>chang@news.get.com</email>
    </author>
    <copyright>Copyright (c) 2006 Get Inc. All rights reserved.</copyright>

    <modified>2006-12-17T22:37:57+00:00</modified>
    <entries>
    <date>2006-12-17</date>

    <entry>
    <title>Some title 1 goes here</title>

    <link href="http://www.get.com/2"/>
    <id>2</id>
    <summary/>
    <modified>2006-12-17T20:15:00+00:00</modified>
    <content>
    Everybody is tired, so there won't be news tomorrow.
    </content>
    </entry>
    <entry>
    <title>No Get Return Date this Year</title>

    <link href="http://www.get.com/3"/>
    <id>2</id>
    <summary/>
    <modified>2006-12-17T20:15:00+00:00</modified>
    <content>
    No returns, No questions for this years events.
    </content>
    </entry>

    </entries>
    <entries>
    <date>2006-12-15</date>
    <entry>
    <title>Get news (old)</title>
    <link href="http://www.get.com/3"/>
    <id>3</id>

    <summary>Due date: 2007/12/18</summary>
    <modified>2006-12-15T21:15:00+00:00</modified>
    <content>
    No get news on 2007/12/18.
    </content>
    </entry>
    </entries>
    </feed>


    Here is what the xquery (called from .xd file format, separate file) should output:

    <rss version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="news.xsd">
    <channel>
    <title> News</title>
    <copyright>Copyright (c) 2006 get Inc. All rights reserved.</copyright>
    <link>http://www.get.com</link>
    <language>en</language>
    <last-updated>2006-12-17T22:37:57+00:00</last-updated>
    <item id="2" published="2006-12-17">
    <title>No news</title>
    <link>http://www.get.com/2</link>
    <modified>2006-12-17T20:15:00+00:00</modified>
    <summary/>
    <description>

    Everybody is tired, so there won't be .
    </description>
    </item>
    <item id="2" published="2006-12-17">
    <title>No more news</title>
    <link>http://www.get.com/2</link>
    <modified>2006-12-17T20:15:00+00:00</modified>
    <summary/>
    <description>

    Everybody is tired, so there won't be news.
    </description>
    </item>
    <item id="3" published="2006-12-15">
    <title>This title</title>
    <link>http://www.get.com/3</link>
    <modified>2006-12-15T21:15:00+00:00</modified>
    <summary>Due date: 2007/12/18</summary>

    <description>content from news</description>
    </item>
    </channel>
    </rss>




    Dont worry about the content, just focus on changing the format correctly for all entries.

    This should use the saxon xquery implementation.

    Thanks!!!
     
    robster, Mar 25, 2007 IP