Hi Paul, I think your looking for xdmp:unpath(). xdmp:unquote() expands escaped xml strings into xml elements.
example: let $string := "<root>child text<child-element />more text</root>" return xdmp:unquote($string) Thanks. -jb On Fri, Dec 2, 2011 at 12:46 PM, Lewon, Paul <[email protected]> wrote: > Hi all, > > > > I must be misunderstanding something fundamental. If I do this: > > > > xquery version "1.0-ml"; > > > > declare namespace clml = > "http://www.xml.cengage.learning-marklogic.com/marklogic"; > > declare namespace clg = > "http://www.xml.cengage-learning-gale.com/docbook-core"; > > > > > > let $attribute-sequence := > /clml:resource/clml:content/clg:article/clg:section/clg:para/clg:emphasis/@* > > return fn:distinct-values($attribute-sequence) > > > > I get the results I expect. But if I do this… > > > > xquery version "1.0-ml"; > > > > declare namespace clml = > "http://www.xml.cengage.learning-marklogic.com/marklogic"; > > declare namespace clg = > "http://www.xml.cengage-learning-gale.com/docbook-core"; > > > > let $path := > '/clml:resource/clml:content/clg:article/clg:section/clg:para/clg:emphasis' > > let $attribute-sequence := xdmp:unquote($path)/@* > > return fn:distinct-values($attribute-sequence) > > > > I get an “Invalid Root Text” error. What am I missing? > > > > Thanks, > > > > Paul Lewon > > Content Systems, Global Production & Manufacturing Services > > Cengage Learning > > 27500 Drake Rd. Farmington Hills, MI 48331 > > > > (: 248-699-4253, ext. 1602 | *: [email protected] | www.cengage.com > > > > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
