From: Doug B. <do...@we...> - 2004-06-07 13:11:22
|
Thanks, David, your example will probably solve my problem. I had tried = just adding the declaration like your example, as opposed to my document constructor attempt, but failed on both your caveats. I wonder if the document constructor will work with a new snapshot? If it does I'll = mention it to the list. It will probably be a day or so before I install the snapshot. =20 Doug =20 -----Original Message----- From: David Mundie [mailto:mu...@an...]=20 Sent: Monday, June 07, 2004 5:25 AM To: do...@we... Cc: exi...@li... Subject: Re: [Exist-open] XML declaration with XQuery Here's what I'm using: <?xml version=3D"1.0" encoding=3D"UTF-8"?>, <?xml-stylesheet type=3D"text/css" href=3D"http://localhost/test.css"?>, <test> { for $speech in document('/db/sanskrit/g.xml')//entryFree[form/orth = &=3D 'kl?p*'] return $speech } </test> Two caveats:=20 (a) the commas are essential; (b) you need a relatively recent snapshot - there was a parser bug = involving processing instructions until sometime in May. - dam On 2004-Jun-06, at 23:32, Doug Black wrote: How do I get an XML declaration, e.g.. <?xml version=3D"1.0" ?> at the = top of my results returned from XQuery so that the browser will recognize the results as XML. I believe I'm looking for something to add to the = XQuery. I've tried to use a document constructor but can't even get past syntax errors, e.g. document {=20 return=20 <collection>=20 (: more XQuery stuff :)=20 </collection>=20 }=20 Thanks,=20 Doug=20 Doug Black=20 West Rock Visions=20 755 Prospect St. #205=20 New Haven, CT 06511=20 Mobile and Office: 203-676-5228=20 Home: 203-389-0184=20 do...@we...=20 =20 |