I have a query the returns an RSS output implementation with some custom nodes.

I need to insert <?xml version="1.0" encoding="UTF-8"?> ahead of the <rss 
version..> declaration.

I found this article from 2009 but wanted to check if there was another way or 
newer simpler approach I could do directly in the xQuery.  Any ideas?
http://markmail.org/message/kwu24lbcdrt2dcim


let $rss:=
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:media="http://search.yahoo.com/mrss/"; 
xmlns:content="http://purl.org/rss/1.0/modules/content/"; 
xmlns:atom="http://www.w3.org/2005/Atom"; 
xmlns:sailthru="http://www.sailthru.com/rss-extension";>
  <channel>
    <title>{$title}</title>
    <description>{$desc}</description>
    <atom:link href="{$link}" rel="self" type="application/rss+xml" />
                {$output}
</channel></rss>

Returns:
[1.0-ml] XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, 
unexpected Version_
67.
68. let $rss:=
69. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:media="http://search.yahoo.com/mrss/"; 
xmlns:content="http://purl.org/rss/1.0/modules/content/"; 
xmlns:atom="http://www.w3.org/2005/Atom"; 
xmlns:sailthru="http://www.sailthru.com/rss-extension";>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to