[xquery-talk] Function and Query Evaluation with No XML Tags Error

Wei, Alice J. ajwei at indiana.edu
Tue Feb 26 10:01:13 PST 2008

Hi, XQueriers:

   I have here simplified my earlier XQuery function to as follows:

declare boundary-space preserve;
declare function local:distinct(
     $seq as xs:anyAtomicType*)
      as xs:anyAtomicType
 for $doc in distinct-values($seq)
 order by $doc
  <ad>{$doc} </ad>

 for $ad in distinct-values(collection("xmldb:exist://db/cbml")//ad/p[contains(upper-case(.),'BOOK')])

What I got now from the query evaluation:

<ad>CRAZY.. The Humor Book that
                        Knows No Boundaries!  </ad>

My intended output:

        <p rend="bggreen">
<emph rend="bold yellow">CRAZY..</emph>
 The Humor Book that
                        Knows No Boundaries!

Is it possible to put the XML tags back? What have I missed here?
Thanks to those who can help.

Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
ajwei at indiana.edu

More information about the talk mailing list