[MarkLogic Dev General] declare XML namespace

Florent Georges lists at fgeorges.org
Thu Jan 28 06:31:10 PST 2016


Hi,

This is the XML declaration, not an XML namespace declaration.  It is
not part of XDM, and cannot be part of a literal XML in XQuery.  If
you need to include it when you send the document to the outside
world, you need to look at the serialisation options of the interface
you use (something like "omit-xml-declaration=false".)

Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


On 28 January 2016 at 14:50, Kari Cowan wrote:
> I may be going about this wrong, but I was trying to insert the xml marker
> above an RSS feed return:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
>
> Returns error> [1.0-ml] XDMP-UNEXPECTED: (err:XPST0003) Unexpected token
> syntax error, unexpected Version_, expecting Comma_ or Rpar_ or SemiColon_
>
>
>
> Seems like a common thing that would be desired, but my websearch didn’t
> find the answer.  Any tips here?
>
>
>
>
>
>
>
> if ($returnRSS) then (
>
>   <?xml version="1.0" encoding="UTF-8"?>
>
>   <rss version="2.0" xmlns:sailthru="http://www.sailthru.com/rss-extension">
>
>    <channel>
>
>    <title>{$this_partner} Events RSS</title>
>
>    <description>See Upcoming Events presented by {$this_partner}
> </description>
>
>    <link>http://www/need/to/map/a/path/to/event/hubpage</link>
>
>    {$outputRSS}
>
>    </channel>
>
>
>
>   </rss>
>
>   )
>
>
>
> ________________________________
> Learn more about ALM, visit http://www.alm.com . – ALM, an Integrated Media
> Company, is a leading provider of news and information for the legal and
> commercial real estate markets. ALM’s market-leading brands include The
> American Lawyer, Corporate Counsel, GlobeSt.com, Insight Conferences,
> Law.com, Law Journal Press, LegalTech, The National Law Journal and Real
> Estate Forum.
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>


More information about the General mailing list